From 6a7cfb637a3b963b60d9c17c4d3c71c7f89a35f6 Mon Sep 17 00:00:00 2001 From: Tomas Doran Date: Wed, 5 Jan 2011 19:31:28 +0000 Subject: [PATCH 1/4] Fix MANIFEST.SKIP --- MANIFEST.SKIP | 2 ++ 1 file changed, 2 insertions(+) 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 From 8acc7a884ca08a86e2eaaea7ebeef6456f85173d Mon Sep 17 00:00:00 2001 From: Tomas Doran Date: Tue, 8 Feb 2011 12:59:32 +0000 Subject: [PATCH 2/4] Whitespace --- lib/Catalyst/Action/RenderView.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/Catalyst/Action/RenderView.pm b/lib/Catalyst/Action/RenderView.pm index 5de16ed..9becb8f 100644 --- a/lib/Catalyst/Action/RenderView.pm +++ b/lib/Catalyst/Action/RenderView.pm @@ -20,7 +20,7 @@ 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 / ] unless exists $c->config->{'Action::RenderView'}->{ignore_classes}; @@ -100,16 +100,16 @@ 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 +debug output considerably, but you can change what gets scrubbed by +setting a list of classes in $c->config->{'Action::RenderView'}->{ignore_classes}. 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->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 class name: $c->config->{'Action::RenderView'}->{scrubber_func} = sub { undef $_ }; @@ -117,8 +117,8 @@ class name: =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 +136,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 From d4efbcf8caf6c886180d00a7d47476a6b68956cd Mon Sep 17 00:00:00 2001 From: Tomas Doran Date: Tue, 8 Feb 2011 13:02:39 +0000 Subject: [PATCH 3/4] Tidy up config useage in Pod --- lib/Catalyst/Action/RenderView.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/Catalyst/Action/RenderView.pm b/lib/Catalyst/Action/RenderView.pm index 9becb8f..b5cc5a1 100644 --- a/lib/Catalyst/Action/RenderView.pm +++ b/lib/Catalyst/Action/RenderView.pm @@ -101,18 +101,18 @@ 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}. +setting a list of classes in the C<< ignore_classes >> configuration key. + For instance: - $c->config->{'Action::RenderView'}->{ignore_classes} = []; + C<< MyApp->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 +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 @@ -148,9 +148,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. From 9e2c4200273dd004a78756a58c4cc5c7bdb3cc2b Mon Sep 17 00:00:00 2001 From: Tomas Doran Date: Mon, 8 Aug 2011 08:45:03 +0000 Subject: [PATCH 4/4] Small fixes --- lib/Catalyst/Action/RenderView.pm | 4 +++- t/lib/TestApp/View/TestView.pm | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Catalyst/Action/RenderView.pm b/lib/Catalyst/Action/RenderView.pm index b5cc5a1..4c11832 100644 --- a/lib/Catalyst/Action/RenderView.pm +++ b/lib/Catalyst/Action/RenderView.pm @@ -23,6 +23,8 @@ sub execute { 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() 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