[Catalyst-commits] r10658 - in trunk/Catalyst-Plugin-PageCache: . lib/Catalyst/Plugin

marcus at dev.catalyst.perl.org marcus at dev.catalyst.perl.org
Thu Jun 25 08:39:39 GMT 2009


Author: marcus
Date: 2009-06-25 08:39:39 +0000 (Thu, 25 Jun 2009)
New Revision: 10658

Modified:
   trunk/Catalyst-Plugin-PageCache/Changes
   trunk/Catalyst-Plugin-PageCache/Makefile.PL
   trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm
Log:
Update to use MRO::Compat


Modified: trunk/Catalyst-Plugin-PageCache/Changes
===================================================================
--- trunk/Catalyst-Plugin-PageCache/Changes	2009-06-25 03:11:14 UTC (rev 10657)
+++ trunk/Catalyst-Plugin-PageCache/Changes	2009-06-25 08:39:39 UTC (rev 10658)
@@ -1,5 +1,8 @@
 Revision history for Perl extension Catalyst::Plugin::PageCache
 
+0.22    2009-06-25 10:38:00
+        - Update to use MRO::Compat
+
 0.21    2008-10-02 10:45:00
         - Check for FileCache in new test to avoid test failures.
 

Modified: trunk/Catalyst-Plugin-PageCache/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-PageCache/Makefile.PL	2009-06-25 03:11:14 UTC (rev 10657)
+++ trunk/Catalyst-Plugin-PageCache/Makefile.PL	2009-06-25 08:39:39 UTC (rev 10658)
@@ -5,6 +5,7 @@
 
 requires 'Catalyst::Runtime' => '0';
 requires 'Test::More';
+requires 'MRO::Compat' => '0.10';
 
 auto_install;
 resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Plugin-PageCache/';

Modified: trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm
===================================================================
--- trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm	2009-06-25 03:11:14 UTC (rev 10657)
+++ trunk/Catalyst-Plugin-PageCache/lib/Catalyst/Plugin/PageCache.pm	2009-06-25 08:39:39 UTC (rev 10658)
@@ -2,7 +2,7 @@
 
 use strict;
 use base qw/Class::Accessor::Fast/;
-use NEXT;
+use MRO::Compat;
 
 our $VERSION = '0.21';
 
@@ -85,25 +85,25 @@
     my $c = shift;
 
     # never serve POST request pages from cache
-    return $c->NEXT::dispatch(@_) if ( $c->req->method eq "POST" );
+    return $c->next::method(@_) if ( $c->req->method eq "POST" );
 
     my $hook =
         $c->config->{'Plugin::PageCache'}->{cache_hook}
       ? $c->can($c->config->{'Plugin::PageCache'}->{cache_hook})
       : undef;
     
-    return $c->NEXT::dispatch(@_) if ( $hook && !$c->$hook() );
+    return $c->next::method(@_) if ( $hook && !$c->$hook() );
 
-    return $c->NEXT::dispatch(@_)
+    return $c->next::method(@_)
       if ( $c->config->{'Plugin::PageCache'}->{auto_check_user}
         && $c->can('user_exists')
         && $c->user_exists);
 
     # check the page cache for a cached copy of this page
-    return $c->NEXT::dispatch(@_)
+    return $c->next::method(@_)
         unless my $key = $c->_get_page_cache_key;
 
-    return $c->NEXT::dispatch(@_)
+    return $c->next::method(@_)
         unless my $data = $c->cache->get( $key );
 
     # Time to remove page from cache?
@@ -133,7 +133,7 @@
             }
         }
 
-        return $c->NEXT::dispatch(@_);
+        return $c->next::method(@_);
     }
 
     $c->log->debug("Serving $key from page cache, expires in "
@@ -228,23 +228,23 @@
     my $c = shift;
 
     # never cache POST requests
-    return $c->NEXT::finalize(@_) if ( $c->req->method eq "POST" );
+    return $c->next::method(@_) if ( $c->req->method eq "POST" );
 
     my $hook =
         $c->config->{'Plugin::PageCache'}->{cache_hook}
       ? $c->can($c->config->{'Plugin::PageCache'}->{cache_hook})
       : undef;
-    return $c->NEXT::finalize(@_) if ( $hook && !$c->$hook() );
+    return $c->next::method(@_) if ( $hook && !$c->$hook() );
 
-    return $c->NEXT::finalize(@_)
+    return $c->next::method(@_)
       if ( $c->config->{'Plugin::PageCache'}->{auto_check_user}
         && $c->can('user_exists')
         && $c->user_exists);
-    return $c->NEXT::finalize(@_) if ( scalar @{ $c->error } );
+    return $c->next::method(@_) if ( scalar @{ $c->error } );
 
     # if we already served the current request from cache, we can skip the
     # rest of this method
-    return $c->NEXT::finalize(@_) if ( $c->_page_cache_used );
+    return $c->next::method(@_) if ( $c->_page_cache_used );
 
     if (!$c->_cache_page
         && scalar @{ $c->config->{'Plugin::PageCache'}->{auto_cache} })
@@ -316,13 +316,13 @@
         $c->_page_cache_not_modified( $data );
     }
 
-    return $c->NEXT::finalize(@_);
+    return $c->next::method(@_);
 }
 
 sub setup {
     my $c = shift;
 
-    $c->NEXT::setup(@_);
+    $c->next::method(@_);
 
     # allow code using old config key to work
     if ( $c->config->{page_cache} and !$c->config->{'Plugin::PageCache'} ) {




More information about the Catalyst-commits mailing list