Skip to content

Commit

Permalink
simplify namespace examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 6, 2014
1 parent e7e9da8 commit 1ddc343
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -271,8 +271,7 @@ The action value is not changed at all, so both values are case sensitive.
sub startup {
my $self = shift;

# /bye -> {controller => 'foo', action => 'bye'}
# -> MyApp::Controller::Foo->bye
# /bye -> MyApp::Controller::Foo->bye
$self->routes->route('/bye')->to(controller => 'foo', action => 'bye');
}

Expand Down Expand Up @@ -303,8 +302,7 @@ C<controller#action>.
During camelization C<-> gets replaced with C<::>, this allows multi-level
C<controller> hierarchies.

# / -> {controller => 'foo-bar', action => 'hi'}
# -> MyApp::Controller::Foo::Bar->hi
# / -> MyApp::Controller::Foo::Bar->hi
$r->route('/')->to('foo-bar#hi');

For security reasons the dispatcher will always check if the C<controller> is
Expand Down

0 comments on commit 1ddc343

Please sign in to comment.