diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 5772d9e..0189b77 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,3 +1,5 @@ +\bCatalyst-Action-RenderView + # Avoid version control files. \bRCS\b \bCVS\b diff --git a/lib/Catalyst/Action/RenderView.pm b/lib/Catalyst/Action/RenderView.pm index 5de16ed..4c11832 100644 --- a/lib/Catalyst/Action/RenderView.pm +++ b/lib/Catalyst/Action/RenderView.pm @@ -20,9 +20,11 @@ sub execute { $c->config->{'Action::RenderView'}->{ignore_classes} = ( ref($c->config->{'debug'}) eq 'HASH' ? $c->config->{'debug'}->{ignore_classes} : undef ) || [ qw/ - DBIx::Class::ResultSource::Table + DBIx::Class::ResultSource::Table DBIx::Class::ResultSourceHandle DateTime + Moose::Meta::Attribute + Moose::Meta::Class / ] unless exists $c->config->{'Action::RenderView'}->{ignore_classes}; $c->config->{'Action::RenderView'}->{scrubber_func} = @@ -49,7 +51,7 @@ sub execute { $c->response->content_type( 'text/html; charset=utf-8' ); } return 1 if $c->req->method eq 'HEAD'; - return 1 if defined $c->response->body; + return 1 if $c->response->has_body; return 1 if scalar @{ $c->error } && !$c->stash->{template}; return 1 if $c->response->status =~ /^(?:204|3\d\d)$/; my $view = $c->view() @@ -100,25 +102,25 @@ See L. When you force debug with dump_info=1, RenderView is capable of removing classes from the objects in your stash. By default it will replace any DBIx::Class resultsource objects with the class name, which cleans up the -debug output considerably, but you can change what gets scrubbed by -setting a list of classes in -$c->config->{'Action::RenderView'}->{ignore_classes}. +debug output considerably, but you can change what gets scrubbed by +setting a list of classes in the C<< ignore_classes >> configuration key. + For instance: - $c->config->{'Action::RenderView'}->{ignore_classes} = []; - -To disable the functionality. You can also set -config->{'Action::RenderView'}->{scrubber_func} to change what it does with the -classes. For instance, this will undef it instead of putting in the + C<< MyApp->config('Action::RenderView' => { ignore_classes => [ ... ] }); >> + +To disable the functionality. You can also set C<< scrubber_func >> +to change what it does with the +classes. For instance, this will undef it instead of putting in the class name: - $c->config->{'Action::RenderView'}->{scrubber_func} = sub { undef $_ }; + C<< MyApp->config('Action::RenderView' => { scrubber_func => sub { undef $_ } }); >> =head2 Deprecation notice This plugin used to be configured by setting C<< $c->config->{debug} >>. -That configuration key is still supported in this release, but is -deprecated, please use the C< 'Action::RenderView' > namespace as shown +That configuration key is still supported in this release, but is +deprecated, please use the C< 'Action::RenderView' > namespace as shown above for configuration in new code. =head1 EXTENDING @@ -136,7 +138,7 @@ you can set it up like this: sub render : ActionClass('RenderView') { } - sub end : Private { + sub end : Private { my ( $self, $c ) = @_; $c->forward('render'); # do stuff here @@ -148,9 +150,11 @@ Marcus Ramberg Florian Ragwitz Erafl@debian.orgE +Tomas Doran Ebobtfish@bobtfish.netE + =head1 COPYRIGHT -Copyright (c) 2006 - 2009 +Copyright (c) 2006 - 2011 the Catalyst::Action::RenderView L as listed above. diff --git a/t/lib/TestApp/View/TestView.pm b/t/lib/TestApp/View/TestView.pm index d596e15..4fdeb63 100644 --- a/t/lib/TestApp/View/TestView.pm +++ b/t/lib/TestApp/View/TestView.pm @@ -1,10 +1,12 @@ package TestApp::View::TestView; +use Moose; -use base qw( Catalyst::View ); +extends qw( Catalyst::View ); sub process { my( $self, $c ) = @_; + warn("HERE"); $c->res->body( 'View' ); } -1; \ No newline at end of file +1; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy