X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=5bf3853c10ff68695be34675f15c869124e5d459;hp=267240d3b8a87cfeedc92ec92a735465c865228b;hb=f3414019f472b55682ef3af53f761b6db7955887;hpb=e5ecd5bc38bac3e2fcfaf643ea2a4c6ab46d7e57 diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 267240d..5bf3853 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -1,5 +1,6 @@ package Catalyst::DispatchType::Chained; +use Class::C3; use Moose; extends 'Catalyst::DispatchType'; @@ -28,6 +29,8 @@ has _children_of => ( default => sub{ {} }, ); +no Moose; + # please don't perltidy this. hairy code within. =head1 NAME @@ -198,7 +201,7 @@ sub recurse_match { # No best action currently # OR This one matches with fewer parts left than the current best action, # And therefore is a better match - # OR No parts and this expects 0 + # OR No parts and this expects 0 # The current best action might also be Args(0), # but we couldn't chose between then anyway so we'll take the last seen @@ -265,13 +268,13 @@ sub register { $part = $path_part[0]; } elsif (@path_part > 1) { Catalyst::Exception->throw( - "Multiple PathPart attributes not supported registering ${action}" + "Multiple PathPart attributes not supported registering " . $action->reverse() ); } if ($part =~ m(^/)) { Catalyst::Exception->throw( - "Absolute parameters to PathPart not allowed registering ${action}" + "Absolute parameters to PathPart not allowed registering " . $action->reverse() ); } @@ -325,7 +328,7 @@ sub uri_for_action { return undef if @captures; # fail for too many captures return join('/', '', @parts); - + } __PACKAGE__->meta->make_immutable; @@ -488,7 +491,7 @@ this debugging output: '-----------------------+------------------------------' ... -Here's a more detailed specification of the attributes belonging to +Here's a more detailed specification of the attributes belonging to C<:Chained>: =head2 Attributes