X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FActionContainer.pm;h=2f98be169cfa466be5b06043eabc2f89897fb7fe;hb=b8ea7be4b18e77f8f3a094d5af64b9e3152ab6d3;hp=a51f90a0e2d9f14e04b24bf6e4b7cfce94d446e6;hpb=0fc2d522eec43202c21e9f0062e43f10db4d9008;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index a51f90a..2f98be1 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -15,27 +15,17 @@ 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); has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} }); -no Moose; - -sub new { - my ($self, $params) = @_; - $params = { part => $params } unless ref $params; - $self->next::method($params); -} +around new => sub { + my ($orig, $self, $params) = @_; + $orig->($self, (ref($params) ? $params : { part => $params } )); +}; +no Moose; sub get_action { my ( $self, $name ) = @_; @@ -84,9 +74,9 @@ stringifies to. Provided by Moose -=head1 AUTHOR +=head1 AUTHORS -Matt S. Trout +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT