X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=f21e34d01830083aeffbb05a4f7dd8c638adacbb;hp=c3abb5b85e688e0cd059bbb7ca6adee091aecf88;hb=241edc9b196ed1d8366b0011c814b0c2d9357516;hpb=2f3812528068bc1d9f7840067f0c03d36cd47e6d diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index c3abb5b..f21e34d 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -19,6 +19,8 @@ L subclasses. use Moose; +with 'MooseX::Emulate::Class::Accessor::Fast'; + has class => (is => 'rw'); has namespace => (is => 'rw'); has 'reverse' => (is => 'rw'); @@ -49,17 +51,7 @@ no warnings 'recursion'; sub dispatch { # Execute ourselves against a context my ( $self, $c ) = @_; - #Moose todo: grrrrrr. this is no good. i don't know enough about it to - # debug it though. why can't we just call the accessor? - #local $c->{namespace} = $self->namespace; - #return $c->execute( $self->class, $self ); - - #believed to be equivalent: - my $orig = $c->namespace; - $c->namespace($self->namespace); - my $ret = $c->execute( $self->class, $self ); - $c->namespace($orig); - return $ret; + return $c->execute( $self->class, $self ); } sub execute {