Skip to content

Commit

Permalink
better rearranging routes example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 30, 2012
1 parent 7145d69 commit e68bade
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -16,7 +16,7 @@ use Scalar::Util qw(blessed weaken);
# "Robots don't have any emotions, and sometimes that makes me very sad."
has commands => sub { Mojolicious::Commands->new };
has controller_class => 'Mojolicious::Controller';
has mode => sub { ($ENV{MOJO_MODE} || 'development') };
has mode => sub { $ENV{MOJO_MODE} || 'development' };
has plugins => sub { Mojolicious::Plugins->new };
has renderer => sub { Mojolicious::Renderer->new };
has routes => sub { Mojolicious::Routes->new };
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Commands.pm
Expand Up @@ -172,7 +172,7 @@ List available options for the command with short descriptions.
$ ./myapp.pl cgi
Start application with CGI backend.
Start application with CGI backend, usually auto detected.
=head2 C<cpanify>
Expand Down Expand Up @@ -249,7 +249,7 @@ application into real files.
$ ./myapp.pl psgi
Start application with PSGI backend.
Start application with PSGI backend, usually auto detected.
=head2 C<routes>
Expand Down
2 changes: 2 additions & 0 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -690,6 +690,8 @@ be very useful.
# GET /example/show -> {controller => 'example', action => 'show'}
my $show = $r->get('/show')->to('example#show');
$r->any('/example')->add_child($show);

# Nothing
$r->get('/secrets/show')->to('secrets#show')->name('show_secrets');
$r->find('show_secrets')->remove;

Expand Down

0 comments on commit e68bade

Please sign in to comment.