[Catalyst-commits] r13673 - trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin

timbunce at dev.catalyst.perl.org timbunce at dev.catalyst.perl.org
Mon Nov 1 12:47:56 GMT 2010


Author: timbunce
Date: 2010-11-01 12:47:56 +0000 (Mon, 01 Nov 2010)
New Revision: 13673

Modified:
   trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm
Log:
Fix for broken previous commit

Modified: trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm
===================================================================
--- trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm	2010-11-01 12:33:15 UTC (rev 13672)
+++ trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm	2010-11-01 12:47:56 UTC (rev 13673)
@@ -96,8 +96,8 @@
     my $config_PageCache = $c->config->{'Plugin::PageCache'};
 
     my $hook_name = $config_PageCache->{cache_dispatch_hook} || $config_PageCache->{cache_hook};
-    return $c->next::method(@_)
-        if $hook_name && $c->can($hook_name) && not $c->$hook();
+    my $hook = $hook_name ? $c->can($hook_name) : undef;
+    return $c->next::method(@_) if ( $hook && !$c->$hook() );
 
     return $c->next::method(@_)
       if ( $config_PageCache->{auto_check_user}
@@ -242,8 +242,8 @@
     my $config_PageCache = $c->config->{'Plugin::PageCache'};
 
     my $hook_name = $config_PageCache->{cache_dispatch_hook} || $config_PageCache->{cache_hook};
-    return $c->next::method(@_)
-        if $hook_name && $c->can($hook_name) && not $c->$hook();
+    my $hook = $hook_name ? $c->can($hook_name) : undef;
+    return $c->next::method(@_) if ( $hook && !$c->$hook() );
 
     return $c->next::method(@_)
       if ( $config_PageCache->{auto_check_user}




More information about the Catalyst-commits mailing list