X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FActionContainer.pm;h=31e36cd072155a9d91c787f8515614e094edd242;hp=e2292e00346fe92559ea73bffbe7c763e7029118;hb=f3414019f472b55682ef3af53f761b6db7955887;hpb=e5ecd5bc38bac3e2fcfaf643ea2a4c6ab46d7e57 diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index e2292e0..31e36cd 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -15,26 +15,20 @@ to represent the various dispatch points in your application. =cut +use Class::C3; use Moose; -use overload ( - - # Stringify to path part for tree search - q{""} => sub { shift->part }, - -); - -has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} }); +has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} }); has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} }); -around 'new' => sub { - my $next = shift; +no Moose; + +sub new { my ($self, $params) = @_; $params = { part => $params } unless ref $params; - $next->($self, $params); -}; + $self->next::method($params); +} -no Moose; sub get_action { my ( $self, $name ) = @_;