1 package Catalyst::Action;
4 use base qw/Class::Accessor::Fast/;
6 __PACKAGE__->mk_accessors(qw/code namespace reverse prefix attributes name/);
10 # Stringify to reverse for debug output etc.
11 q{""} => sub { shift->{reverse} },
13 # Codulate to encapsulated action coderef
14 '&{}' => sub { shift->{code} },
20 Catalyst::Action - Catalyst Action
40 sub execute { # Execute ourselves against a context
41 my ( $self, $c ) = @_;
42 return $c->execute( $self->namespace, $self );
55 sub new { # Dumbass constructor
56 my ( $class, $attrs ) = @_;
57 return bless { %{ $attrs || {} } }, $class;
68 This program is free software, you can redistribute it and/or modify it under
69 the same terms as Perl itself.