X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FActionContainer.pm;h=258cb15227e4f2c32559aafcc3cd40518685c7c2;hb=3c0a4b5445bfcc26d20f038fce7ce23a95eb1197;hp=bb21c0916cbde52017406047f7e1b45d9a03ee33;hpb=a13e21ab238a2752262dda5773d5be7a6273d875;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index bb21c09..258cb15 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -35,6 +35,12 @@ to represent the various dispatch points in your application. =head1 METHODS +=head2 new(\%data | $part) + +Can be called with { part => $part, actions => \%actions } for full +construction or with just a part, which will result in an empty actions +hashref to be populated via add_action later + =head2 get_action($name) Returns an action from this container based on the action name, or undef @@ -55,7 +61,7 @@ Adds an action, optionally providing a name to override $action->name sub add_action { my ( $self, $action, $name ) = @_; - my $name ||= $action->name; + $name ||= $action->name; $self->actions->{$name} = $action; }