Router::Simple::SubMapper - submapper
use Router::Simple; my $router = Router::Simple->new(); my $s = $router->submapper('/entry/{id}', {controller => 'Entry'}); $s->connect('/edit' => {action => 'edit'}) ->connect('/show' => {action => 'show'});
Router::Simple::SubMapper is sub-mapper for Router::Simple. This class provides shorthand to create routes, that have common parts.
Do not call this method directly.You should create new instance from $router->submapper(%args).
This method creates new route to parent $router with @args and arguments of ->submapper().
This method returns $submapper itself for method-chain.
submapper() can be called recursively to build nested routes.
Router::Simple
To install Router::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Router::Simple
CPAN shell
perl -MCPAN -e shell install Router::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.