Router...Declare(3pm)
π¦ Router::Simple::Declare(3pm) π¦
User Contributed Perl Documentation β yeah bestie, this is one of the community-written ones π
β¨ NAME β¨
Router::Simple::Declare β the declarative interface for Router::Simple. it's giving "just tell me the routes, don't make me write a million method calls" π
πΈ SYNOPSIS πΈ
use Router::Simple::Declare;
my $router = router {
connect '/{controller}/{action}/{id}';
submapper('/account', {controller => 'Account'})
->connect('/login', {action => 'login'})
->connect('/logout', {action => 'logout'});
};
$router->match('/entry/show/3');
okay so look at this π«Ά you set up the whole router inside one router { ... } block, you connect your routes, you chain submapper calls together like a little daisy chain of routing goodness, and then $router->match(...) does its thing. iconic behaviour, no cap π₯
π DESCRIPTION π
Literally the easy way to declare a router object β¨ that's it, that's the description. lowkey perfect.
π USAGE π
Go look at the SYNOPSIS up there, bestie π that's the whole usage. And see Router::Simple for more deets β that's where the real lore lives π
π FUNCTIONS π
The cast of characters, in the order the page lists them:
routerconnectsubmapper
that's the lineup π€ the manpage keeps it mystery-girl short here, so treat the SYNOPSIS as your source of truth π
π SEE ALSO π
Router::Simpleβ the main character, go read it π§
and that's a wrap, bestie!! π this lil page came to you courtesy of the User Contributed Perl Documentation crew, with a source/version vibe of perl v5.42.0 and a timestamp of 2015-04-13 π mwah, go build some routes πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Router-Simple 0.17-bp160.1.12 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms