1Catalyst::Action(3)   User Contributed Perl Documentation  Catalyst::Action(3)
2
3
4

NAME

6       Catalyst::Action - Catalyst Action
7

SYNOPSIS

9           <form action="[%c.uri_for(c.action)%]">
10
11           $c->forward( $action->private_path );
12

DESCRIPTION

14       This class represents a Catalyst Action. You can access the object for
15       the currently dispatched action via $c->action. See the
16       Catalyst::Dispatcher for more information on how actions are
17       dispatched. Actions are defined in Catalyst::Controller subclasses.
18

METHODS

20   attributes
21       The sub attributes that are set for this action, like Local, Path,
22       Private and so on. This determines how the action is dispatched to.
23
24   class
25       Returns the name of the component where this action is defined.
26       Derived by calling the catalyst_component_name method on each
27       component.
28
29   code
30       Returns a code reference to this action.
31
32   dispatch( $c )
33       Dispatch this action against a context.
34
35   execute( $controller, $c, @args )
36       Execute this action's coderef against a given controller with a given
37       context and arguments
38
39   match( $c )
40       Check Args attribute, and makes sure number of args matches the
41       setting.  Always returns true if Args is omitted.
42
43   match_captures ($c, $captures)
44       Can be implemented by action class and action role authors. If the
45       method exists, then it will be called with the request context and an
46       array reference of the captures for this action.
47
48       Returning true from this method causes the chain match to continue,
49       returning makes the chain not match (and alternate, less preferred
50       chains will be attempted).
51
52   match_captures_constraints ($c, \@captures);
53       Does the \@captures given match any constraints (if any constraints
54       exist).  Returns true if you ask but there are no constraints.
55
56   match_args($c, $args)
57       Does the Args match or not?
58
59   resolve_type_constraint
60       Tries to find a type constraint if you have on on a type constrained
61       method.
62
63   compare
64       Compares 2 actions based on the value of the "Args" attribute, with no
65       "Args" having the highest precedence.
66
67   equals
68           if( $action->equal($other_action) ) { ... }
69
70       Returns true if the two actions are equal.
71
72   namespace
73       Returns the private namespace this action lives in.
74
75   reverse
76       Returns the private path for this action.
77
78   private_path
79       Returns absolute private path for this action. Unlike "reverse", the
80       "private_path" of an action is always suitable for passing to
81       "forward".
82
83   name
84       Returns the sub name of this action.
85
86   number_of_args
87       Returns the number of args this action expects. This is 0 if the action
88       doesn't take any arguments and undef if it will take any number of
89       arguments.
90
91   normalized_arg_number
92       The number of arguments (starting with zero) that the current action
93       defines, or undefined if there is not defined number of args (which is
94       later treated as, " as many arguments as you like").
95
96   comparable_arg_number
97       For the purposes of comparison we normalize 'number_of_args' so that if
98       it is undef we mean ~0 (as many args are we can think of).
99
100   number_of_captures
101       Returns the number of captures this action expects for Chained actions.
102
103   list_extra_info
104       A HashRef of key-values that an action can provide to a debugging
105       screen
106
107   scheme
108       Any defined scheme for the action
109
110   meta
111       Provided by Moose.
112

AUTHORS

114       Catalyst Contributors, see Catalyst.pm
115
117       This library is free software. You can redistribute it and/or modify it
118       under the same terms as Perl itself.
119
120
121
122perl v5.34.0                      2021-07-22               Catalyst::Action(3)
Impressum