1Router::Simple::DeclareU(s3e)r Contributed Perl DocumentaRtoiuotner::Simple::Declare(3)
2
3
4
6 Router::Simple::Declare - declarative interface for Router::Simple
7
9 use Router::Simple::Declare;
10
11 my $router = router {
12 connect '/{controller}/{action}/{id}';
13
14 submapper('/account', {controller => 'Account'})
15 ->connect('/login', {action => 'login'})
16 ->connect('/logout', {action => 'logout'});
17 };
18 $router->match('/entry/show/3');
19
21 Easy way to declare router object.
22
24 look the SYNOPSIS.see Router::Simple for more details.
25
27 router
28 connect
29 submapper
30
32 Router::Simple
33
34
35
36perl v5.30.1 2020-01-30 Router::Simple::Declare(3)