I'm reading tweetylicious source from github to study Mojolicious framework:
However I'm confused by below piece of code ladder sub ...
. What does it mean in Perl? It looks like not a regular Perl grammar.
Btw, I'm with Strawberry Perl 5.
# The rest of the routes are specific to logged in users, so we
# add a ladder to make sure (instead of making sure inside each route)
ladder sub {
my $self = shift;
return 1 if $self->session('name');
$self->redirect_to('/login') and return;
};