Skip to content

Commit

Permalink
more consistent hook examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 19, 2013
1 parent d75c25a commit cb9802c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Test/Mojo.pm
Expand Up @@ -482,9 +482,9 @@ Access application with L<Mojo::UserAgent/"app">.
# Change application behavior
$t->app->hook(before_dispatch => sub {
my $self = shift;
$self->render(text => 'This request did not reach the router.')
if $self->req->url->path->contains('/user');
my $c = shift;
$c->render(text => 'This request did not reach the router.')
if $c->req->url->path->contains('/user');
});
# Extract additional information
Expand Down

0 comments on commit cb9802c

Please sign in to comment.