1Router::Simple::DeclareU(s3eprm)Contributed Perl DocumenRtoauttieorn::Simple::Declare(3pm)
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.38.0 2023-07-21 Router::Simple::Declare(3pm)