X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=fb6df0dfd170c3b1e51729dee95a4f186231c2cf;hb=aea897b2495d079f3849eb30cd3dc7c89b31f742;hp=1442649c959c96c54edbda870969677ce1297ec0;hpb=949f330d1f0f7d5fc868ddeb6f338733a2dfa39f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 1442649..fb6df0d 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -13,28 +13,27 @@ use Catalyst::Utils; with 'Catalyst::Component::ApplicationAttribute'; -has path_prefix => - ( - is => 'rw', - isa => 'Str', - init_arg => 'path', - predicate => 'has_path_prefix', - ); +has path_prefix => ( + is => 'rw', + isa => 'Str', + init_arg => 'path', + predicate => 'has_path_prefix', +); -has action_namespace => - ( - is => 'rw', - isa => 'Str', - init_arg => 'namespace', - predicate => 'has_action_namespace', - ); +has action_namespace => ( + is => 'rw', + isa => 'Str', + init_arg => 'namespace', + predicate => 'has_action_namespace', +); -has actions => - ( - accessor => '_controller_actions', - isa => 'HashRef', - init_arg => undef, - ); +has actions => ( + accessor => '_controller_actions', + isa => 'HashRef', + init_arg => undef, +); + +has action_args => (is => 'ro'); # ->config(actions => { '*' => ... has _all_actions_attributes => ( @@ -279,7 +278,11 @@ sub create_action { my %args = @_; my $class = $self->action_class(%args); - my $action_args = $self->config->{action_args}; + my $action_args = ( + ref($self) + ? $self->action_args + : $self->config->{action_args} + ); my %extra_args = ( %{ $action_args->{'*'} || {} },