More Related Content
Similar to The Joy of Smartmatch (20)
More from Andrew Shitov (20)
The Joy of Smartmatch
- 9. How it looks like now
no
if
$]
>=
5.018,
"experimental::smartmatch";
- 19. sub
route
{
'/'
}
URL match test
$page-‐>render
if
$url
~~
$page-‐>route;
- 20. sub
route
{
qr{^/admin/}
}
URL match test
$page-‐>render
if
$url
~~
$page-‐>route;