Subject: | Path('/') attribute does not work, root URL generally SNAFU |
I want to set a controller for the homepage in my Catalyst app. When doing
package MyApp;
sub splashscreen : Path('/') {
my ( $self, $c ) = @_;
$c->stash->{template} = 'splash';
}
All I get in the logs at startup is
.=--------------------------+---------------------------------=.
| Public | Private |
|=--------------------------+---------------------------------=|
| // | /splashscreen |
and no joy at http://localhost:3000/ (action /default taken). Trying
with Path(''), /splashscreen does not even show up in the "Loaded public
actions" list. And finally when I try
sub splashscreen : Regex('^.*$') {
# ...
}
that catches everything *but* the home page!
Looks like something is very brokenly special-casing the root URL.