I'm just working my way through some Mojolicious tutorials. Can someone tell me what the => 'index' is doing after the anonymous subroutine please? I know it's telling Mojolicious to look for a template called 'index' but why is it written in this way rather than $c->render(template => 'index') inside the sub?
Thanks.get '/' => sub my $c = shift; $c->render; } => 'index';
In reply to Anonymous sub clarification by epoch1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |