Skip to content

Commit

Permalink
better shortcut example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 10, 2012
1 parent 5d4c433 commit c70b528
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.95 2012-05-10
- Improved documentation.

2.94 2012-05-09
- Added support for 308 redirects to Mojo::UserAgent.
- Added support for new HTTP status codes.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -34,7 +34,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.94';
our $VERSION = '2.95';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojolicious/Routes/Route.pm
Expand Up @@ -360,7 +360,8 @@ Construct a new L<Mojolicious::Routes::Route> object.
$r = $r->add_child(Mojolicious::Route->new);
Add a new child to this route.
Add a new child to this route, it will be automatically removed from its
current parent if necessary.
# Reattach route
$r->add_child($r->find('foo'));
Expand Down Expand Up @@ -623,7 +624,7 @@ L<Mojolicious::Lite> tutorial for more argument variations.
In addition to the attributes and methods above you can also call shortcuts
on L<Mojolicious::Routes::Route> objects.
$r->add_shortcut(firefox => sub {
$r->root->add_shortcut(firefox => sub {
my ($r, $path) = @_;
$r->get($path, agent => qr/Firefox/);
});
Expand Down

0 comments on commit c70b528

Please sign in to comment.