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   namespace
68       Returns the private namespace this action lives in.
69
70   reverse
71       Returns the private path for this action.
72
73   private_path
74       Returns absolute private path for this action. Unlike "reverse", the
75       "private_path" of an action is always suitable for passing to
76       "forward".
77
78   name
79       Returns the sub name of this action.
80
81   number_of_args
82       Returns the number of args this action expects. This is 0 if the action
83       doesn't take any arguments and undef if it will take any number of
84       arguments.
85
86   normalized_arg_number
87       The number of arguments (starting with zero) that the current action
88       defines, or undefined if there is not defined number of args (which is
89       later treated as, " as many arguments as you like").
90
91   comparable_arg_number
92       For the purposes of comparison we normalize 'number_of_args' so that if
93       it is undef we mean ~0 (as many args are we can think of).
94
95   number_of_captures
96       Returns the number of captures this action expects for Chained actions.
97
98   list_extra_info
99       A HashRef of key-values that an action can provide to a debugging
100       screen
101
102   scheme
103       Any defined scheme for the action
104
105   meta
106       Provided by Moose.
107

AUTHORS

109       Catalyst Contributors, see Catalyst.pm
110
112       This library is free software. You can redistribute it and/or modify it
113       under the same terms as Perl itself.
114
115
116
117perl v5.30.0                      2019-07-26               Catalyst::Action(3)
Impressum