X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FRegex.pm;h=49f763693b049175e44a5f2245af6520b68c2311;hp=38b2513de47de66926e07b5002742a8da85a132d;hb=4082e67814e85bc9820e56eb38e5e21511c0a5f8;hpb=694d15f1f6031de10d1ecb047b9e66dd0982e3a3 diff --git a/lib/Catalyst/DispatchType/Regex.pm b/lib/Catalyst/DispatchType/Regex.pm index 38b2513..49f7636 100644 --- a/lib/Catalyst/DispatchType/Regex.pm +++ b/lib/Catalyst/DispatchType/Regex.pm @@ -16,9 +16,7 @@ See L. =head1 METHODS -=over 4 - -=item $self->list($c) +=head2 $self->list($c) =cut @@ -33,7 +31,7 @@ sub list { if ( @{ $self->{compiled} } ); } -=item $self->match( $c, $path ) +=head2 $self->match( $c, $path ) =cut @@ -46,6 +44,7 @@ sub match { foreach my $compiled ( @{ $self->{compiled} || [] } ) { if ( my @snippets = ( $path =~ $compiled->{re} ) ) { + next unless $compiled->{action}->match($c); $c->req->action( $compiled->{path} ); $c->req->match($path); $c->req->snippets( \@snippets ); @@ -58,7 +57,7 @@ sub match { return 0; } -=item $self->register( $c, $action ) +=head2 $self->register( $c, $action ) =cut @@ -81,7 +80,7 @@ sub register { return 0; } -=item $self->register_regex($c, $re, $action) +=head2 $self->register_regex($c, $re, $action) =cut @@ -97,8 +96,6 @@ sub register_regex { ); } -=back - =head1 AUTHOR Matt S Trout