X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FBase.pm;h=b1990e9b692eaa599db906f5085fb2563d7028e3;hb=34d28dfd33574ce30aca69fb8700b61111d97b92;hp=18e6f6e2d02ee2bc0a49b7086e94d2ec57a4d7a3;hpb=649fd1fa74ee22fb2f5220dbdcb25d02427034b2;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index 18e6f6e..b1990e9 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -136,20 +136,24 @@ sub register_actions { next; } my $reverse = $namespace ? "$namespace/$method" : $method; - my $action = $self->_action_class->new( - { - name => $method, - code => $code, - reverse => $reverse, - namespace => $namespace, - class => $class, - attributes => $attrs, - } + my $action = $self->create_action( + name => $method, + code => $code, + reverse => $reverse, + namespace => $namespace, + class => $class, + attributes => $attrs, ); + $c->dispatcher->register( $c, $action ); } } +sub create_action { + my $self = shift; + $self->_action_class->new( { @_ } ); +} + sub _parse_attrs { my ( $self, $c, $name, @attrs ) = @_; my %attributes;