[Catalyst-commits] r9046 - in trunk/Catalyst-Plugin-Session:
lib/Catalyst/Plugin t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Jan 9 02:05:18 GMT 2009
Author: t0m
Date: 2009-01-09 02:05:18 +0000 (Fri, 09 Jan 2009)
New Revision: 9046
Modified:
trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm
trunk/Catalyst-Plugin-Session/t/01_setup.t
Log:
Switch to MRO::Compat's maybe::next::method. I could probably use just next::method for some of these, but I'm feeling paranoid
Modified: trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm
===================================================================
--- trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm 2009-01-09 01:55:55 UTC (rev 9045)
+++ trunk/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session.pm 2009-01-09 02:05:18 UTC (rev 9046)
@@ -6,7 +6,7 @@
use strict;
use warnings;
-use NEXT;
+use MRO::Compat;
use Catalyst::Exception ();
use Digest ();
use overload ();
@@ -39,7 +39,7 @@
sub setup {
my $c = shift;
- $c->NEXT::setup(@_);
+ $c->maybe::next::method(@_);
$c->check_session_plugin_requirements;
$c->setup_session;
@@ -73,7 +73,7 @@
%$cfg,
);
- $c->NEXT::setup_session();
+ $c->maybe::next::method();
}
sub prepare_action {
@@ -86,7 +86,7 @@
@{ $c->stash }{ keys %$flash_data } = values %$flash_data;
}
- $c->NEXT::prepare_action(@_);
+ $c->maybe::next::method(@_);
}
sub finalize_headers {
@@ -95,7 +95,7 @@
# fix cookie before we send headers
$c->_save_session_expires;
- return $c->NEXT::finalize_headers(@_);
+ return $c->maybe::next::method(@_);
}
sub finalize_body {
@@ -106,13 +106,13 @@
# the session database (or whatever Session::Store you use).
$c->finalize_session;
- return $c->NEXT::finalize_body(@_);
+ return $c->maybe::next::method(@_);
}
sub finalize_session {
my $c = shift;
- $c->NEXT::finalize_session;
+ $c->maybe::next::method(@_);
$c->_save_session_id;
$c->_save_session;
@@ -273,7 +273,7 @@
sub _clear_session_instance_data {
my $c = shift;
$c->$_(undef) for @session_data_accessors;
- $c->NEXT::_clear_session_instance_data; # allow other plugins to hook in on this
+ $c->maybe::next::method(@_); # allow other plugins to hook in on this
}
sub delete_session {
@@ -516,7 +516,7 @@
my $c = shift;
(
- $c->NEXT::dump_these(),
+ $c->maybe::next::method(),
$c->sessionid
? ( [ "Session ID" => $c->sessionid ], [ Session => $c->session ], )
@@ -525,10 +525,10 @@
}
-sub get_session_id { shift->NEXT::get_session_id(@_) }
-sub set_session_id { shift->NEXT::set_session_id(@_) }
-sub delete_session_id { shift->NEXT::delete_session_id(@_) }
-sub extend_session_id { shift->NEXT::extend_session_id(@_) }
+sub get_session_id { shift->maybe::next::method(@_) }
+sub set_session_id { shift->maybe::next::method(@_) }
+sub delete_session_id { shift->maybe::next::method(@_) }
+sub extend_session_id { shift->maybe::next::method(@_) }
__PACKAGE__;
Modified: trunk/Catalyst-Plugin-Session/t/01_setup.t
===================================================================
--- trunk/Catalyst-Plugin-Session/t/01_setup.t 2009-01-09 01:55:55 UTC (rev 9045)
+++ trunk/Catalyst-Plugin-Session/t/01_setup.t 2009-01-09 02:05:18 UTC (rev 9046)
@@ -19,6 +19,7 @@
{
package MockCxt;
+ use MRO::Compat;
use base $m;
sub new { bless {}, $_[0] }
sub config { \%config }
More information about the Catalyst-commits
mailing list