);
+sub new {
+ my ( $class, $fields ) = @_;
+
+ $fields = { part => $fields, actions => {} } unless ref $fields;
+
+ $class->SUPER::new($fields);
+}
+
=head1 NAME
Catalyst::ActionContainer - Catalyst Action Container
return;
}
+=head2 add_action($action, [ $name ])
+
+Adds an action, optionally providing a name to override $action->name
+
+=cut
+
+sub add_action {
+ my ( $self, $action, $name ) = @_;
+ $name ||= $action->name;
+ $self->actions->{$name} = $action;
+}
+
=head2 actions
Accessor to the actions hashref, containing all actions in this container.