1Router::Simple::SubMappUesre(r3pCmo)ntributed Perl DocumReonuttaetri:o:nSimple::SubMapper(3pm)
2
3
4

NAME

6       Router::Simple::SubMapper - submapper
7

SYNOPSIS

9           use Router::Simple;
10
11           my $router = Router::Simple->new();
12           my $s = $router->submapper('/entry/{id}', {controller => 'Entry'});
13           $s->connect('/edit' => {action => 'edit'})
14             ->connect('/show' => {action => 'show'});
15

DESCRIPTION

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

METHODS

21       my $submapper = $router->submapper(%args);
22           Do not call this method directly.You should create new instance
23           from $router->submapper(%args).
24
25       $submapper->connect(@args)
26           This method creates new route to parent $router with @args and
27           arguments of ->submapper().
28
29           This method returns $submapper itself for method-chain.
30
31       $submapper->submapper(%args)
32           submapper() can be called recursively to build nested routes.
33
34           This method returns $submapper itself for method-chain.
35

SEE ALSO

37       Router::Simple
38
39
40
41perl v5.38.0                      2023-07-21    Router::Simple::SubMapper(3pm)
Impressum