Open Altai-man opened 3 years ago
If I change the above example to:
route :name<root>, {
Then all of the examples stop working, complaining that they want the qualified name, however qualification should be optional.
Also expanded with some non-working ones for included routes:
my $application = route {
get :name<home>, -> {
content 'text/plain', join "\n",
# Fine
abs-link('home'),
abs-link('lit'),
abs-link('qs', 'tools', query => 'abc?!'),
abs-link('qs', 'tools'),
# Fails to % encode the space
abs-link('segs', 42, 'foo bar.jpg'),
# Should not consider `is cookie` and `is header`
# abs-link('noqs'),
# These don't work (routes not found)
abs-link('blog.home'),
abs-link('blog.post', 42),
'';
}
get :name<lit>, -> 'foo', 'bar' { }
get :name<segs>, -> 'product', $id, 'docs', $file { }
get :name<qs>, -> 'search', $category, :$query {}
get :name<noqs>, -> 'baz', :$foo! is cookie, :$bar! is header {}
include 'blog' => route :name<blog>, {
get :name<home>, -> {}
get :name<post>, -> 'post', $id {}
}
}
Doing some testing. Some findings: