X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=e8b5230371ffdbd8b53a22ea760c625b768d1cf0;hb=af3ff00e4738b2e87d189e79fd12739315711ab3;hp=f80c00bd84138c2792c53c47049ff0210c318dce;hpb=6b23994966a2a66b90986a51e7e1d71f62d90f44;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index f80c00b..e8b5230 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -3,7 +3,7 @@ package Catalyst::Action; use strict; use base qw/Class::Accessor::Fast/; -__PACKAGE__->mk_accessors(qw/code namespace reverse prefix attributes name/); +__PACKAGE__->mk_accessors(qw/class namespace reverse attributes name code/); use overload ( @@ -31,6 +31,8 @@ See L. =item attributes +=item class + =item code =item execute @@ -39,7 +41,8 @@ See L. sub execute { # Execute ourselves against a context my ( $self, $c ) = @_; - return $c->execute( $self->namespace, $self ); + local $c->{namespace} = $self->namespace; + return $c->execute( $self->class, $self ); } =item namespace @@ -48,15 +51,6 @@ sub execute { # Execute ourselves against a context =item name -=item new - -=cut - -sub new { # Dumbass constructor - my ( $class, $attrs ) = @_; - return bless { %{ $attrs || {} } }, $class; -} - =back =head1 AUTHOR