Skip to content

Commit

Permalink
better route matching examples and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 3, 2012
1 parent 9c0b1b3 commit b449501
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 103 deletions.
4 changes: 3 additions & 1 deletion lib/Mojolicious/Routes/Match.pm
Expand Up @@ -146,6 +146,7 @@ Mojolicious::Routes::Match - Routes visitor
=head1 SYNOPSIS
use Mojolicious::Controller;
use Mojolicious::Routes;
use Mojolicious::Routes::Match;
Expand All @@ -155,8 +156,9 @@ Mojolicious::Routes::Match - Routes visitor
$r->put('/bar')->to(action => 'bar');
# Match
my $c = Mojolicious::Controller->new;
my $m = Mojolicious::Routes::Match->new(PUT => '/bar');
$m->match($r);
$m->match($r, $c);
say $m->captures->{action};
=head1 DESCRIPTION
Expand Down

0 comments on commit b449501

Please sign in to comment.