X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FActionContainer.pm;h=2f98be169cfa466be5b06043eabc2f89897fb7fe;hb=b8ea7be4b18e77f8f3a094d5af64b9e3152ab6d3;hp=9d41f4e3947ee57b9748296c49304079cf028c2e;hpb=5fb12dbb7e69039e0ea22ec4d7cb627206b4508b;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index 9d41f4e..2f98be1 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -17,21 +17,12 @@ to represent the various dispatch points in your application. 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 { {} }); -around 'new' => sub { - my $next = shift; - my ($self, $params) = @_; - $params = { part => $params } unless ref $params; - $next->($self, $params); +around new => sub { + my ($orig, $self, $params) = @_; + $orig->($self, (ref($params) ? $params : { part => $params } )); }; no Moose; @@ -83,9 +74,9 @@ stringifies to. Provided by Moose -=head1 AUTHOR +=head1 AUTHORS -Matt S. Trout +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT