Add the following subroutine to your C<lib/Hello/Controller/Root.pm>
file:
- sub hello : Global {
+ sub hello :Global {
my ( $self, $c ) = @_;
$c->response->body("Hello, World!");
Change the hello method in C<lib/Hello/Controller/Root.pm> to the
following:
- sub hello : Global {
+ sub hello :Global {
my ( $self, $c ) = @_;
$c->stash->{template} = 'hello.tt';
In C<lib/Hello/Controller/Site.pm>, add the following method:
- sub test : Local {
+ sub test :Local {
my ( $self, $c ) = @_;
$c->stash->{username} = "John";