Skip to content

Commit

Permalink
mention both namespaces in routing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 6, 2014
1 parent 13881d2 commit 8169d06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -149,7 +149,8 @@ organized CPAN distribution to maximize maintainability.
|- lib # Library directory
| |- MyApp.pm # Application class
| +- MyApp # Application namespace
| +- Example.pm # Controller class
| +- Controller # Controller namespace
| +- Example.pm # Controller class
|- t # Test directory
| +- basic.t # Random test
|- log # Log directory
Expand Down
7 changes: 4 additions & 3 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -259,9 +259,10 @@ old ones.
When the dispatcher sees C<controller> and C<action> values in the stash it
will always try to turn them into a class and method to dispatch to. The
C<controller> value gets camelized using L<Mojo::Util/"camelize"> and
prefixed with a C<namespace> (defaulting to the applications class followed by
C<::Controller>). While the action value is not changed at all, because of
this both values are case sensitive.
prefixed with a C<namespace>, which has two default values, the applications
class followed by C<::Controller> as well as the bare application class, and
they are searched in that order. While the action value is not changed at all,
because of this both values are case sensitive.

# Application
package MyApp;
Expand Down

0 comments on commit 8169d06

Please sign in to comment.