| 1 | package <%= ${class} %>::Controller::Example; | ||
| 2 | use Mojo::Base 'Mojolicious::Controller'; | ||
| 3 | |||
| 4 | # This action will render a template | ||
| 5 | sub welcome { | ||
| 6 | my $self = shift; | ||
| 7 | |||
| 8 | # Render template "example/welcome.html.ep" with message | ||
| 9 | $self->render(msg => 'Welcome to the Mojolicious real-time web framework!'); | ||
| 10 | } | ||
| 11 | |||
| 12 | 1; |