X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FActionContainer.pm;fp=lib%2FCatalyst%2FActionContainer.pm;h=f3cb7e06669bc8f79130bb50fa31d3b25b344e7c;hp=61fd0a990f6ce1b1884b2f852409f07483df2bff;hb=4090e3bb3fea1a73ac369250e31584d61428b808;hpb=96d8d513f11c4fc078b4956a779a68f411cfbee6 diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index 61fd0a9..f3cb7e0 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -15,21 +15,17 @@ to represent the various dispatch points in your application. =cut -use MRO::Compat; -use mro 'c3'; use Moose; has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} }); 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 ) = @_;