Document this
Tomas Doran [Tue, 22 Nov 2011 20:22:04 +0000 (20:22 +0000)]
lib/Catalyst/Action.pm
lib/Catalyst/DispatchType/Chained.pm

index 09f81a8..af60527 100644 (file)
@@ -172,6 +172,17 @@ Returns the number of captures this action expects for L<Chained|Catalyst::Dispa
 
 Provided by Moose.
 
+=head1 OPTIONAL METHODS
+
+=head2 match_captures
+
+Can be implemented by action class and action role authors. If the method
+exists, then it will be called with the request context and an array reference
+of the captures for this action.
+
+Returning true from this method causes the chain match to continue, returning
+makes the chain not match (and alternate, less preferred chains will be attempted).
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm
index 13453df..ede2b69 100644 (file)
@@ -677,6 +677,13 @@ The C<forward>ing to other actions does just what you would expect. But if
 you C<detach> out of a chain, the rest of the chain will not get called
 after the C<detach>.
 
+=head2 match_captures
+
+A method which can optionally be implemented by actions to
+stop chain matching.
+
+See L<Catalyst::Action> for further details.
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm