1Router::Simple::SubMappUesre(r3)Contributed Perl DocumenRtoauttieorn::Simple::SubMapper(3)
2
3
4
6 Router::Simple::SubMapper - submapper
7
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
17 Router::Simple::SubMapper is sub-mapper for Router::Simple. This class
18 provides shorthand to create routes, that have common parts.
19
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
37 Router::Simple
38
39
40
41perl v5.30.1 2020-01-30 Router::Simple::SubMapper(3)