MATSUNO★Tokuhiro > Router-Simple-0.13 > Router::Simple::SubMapper

Download:
Router-Simple-0.13.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Router-Simple-0.15

NAME ^

Router::Simple::SubMapper - submapper

SYNOPSIS ^

    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'});

DESCRIPTION ^

Router::Simple::SubMapper is sub-mapper for Router::Simple. This class provides shorthand to create routes, that have common parts.

METHODS ^

my $submapper = $router->submapper(%args);

Do not call this method directly.You should create new instance from $router->submapper(%args).

$submapper->connect(@args)

This method creates new route to parent $router with @args and arguments of ->submapper().

This method returns $submapper itself for method-chain.

SEE ALSO ^

Router::Simple

syntax highlighting: