Reformatted documentation
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Action.pm
CommitLineData
fbcc39ad 1package Catalyst::Action;
2
3use strict;
4use base qw/Class::Accessor::Fast/;
5
11bd4e3e 6__PACKAGE__->mk_accessors(qw/class namespace reverse attributes name code/);
fbcc39ad 7
8use overload (
9
10 # Stringify to reverse for debug output etc.
11 q{""} => sub { shift->{reverse} },
12
13 # Codulate to encapsulated action coderef
14 '&{}' => sub { shift->{code} },
15
16);
17
18=head1 NAME
19
20Catalyst::Action - Catalyst Action
21
22=head1 SYNOPSIS
23
24See L<Catalyst>.
25
26=head1 DESCRIPTION
27
28=head1 METHODS
29
b5ecfcf0 30=head2 attributes
fbcc39ad 31
b5ecfcf0 32=head2 class
b96f127f 33
b5ecfcf0 34=head2 code
11bd4e3e 35
b5ecfcf0 36=head2 execute
fbcc39ad 37
38=cut
39
40sub execute { # Execute ourselves against a context
41 my ( $self, $c ) = @_;
261c571e 42 local $c->namespace = $self->namespace;
11bd4e3e 43 return $c->execute( $self->class, $self );
fbcc39ad 44}
45
b5ecfcf0 46=head2 namespace
fbcc39ad 47
b5ecfcf0 48=head2 reverse
6b239949 49
b5ecfcf0 50=head2 name
fbcc39ad 51
52=head1 AUTHOR
53
54Matt S. Trout
55
56=head1 COPYRIGHT
57
58This program is free software, you can redistribute it and/or modify it under
59the same terms as Perl itself.
60
61=cut
62
631;