| MyApp::Model::DB::Role | class |
| MyApp::Model::DB::User | class |
| MyApp::Model::DB::UserRole | class |
- | MyApp::View::TT | instance |
+ | MyApp::View::HTML | instance |
'-------------------------------------------------------------------+----------'
...
-Debug
ConfigLoader
Static::Simple
-
+
StackTrace
-
+
Authentication
-
+
Session
Session::Store::FastMmap
Session::State::Cookie
return;
} else {
# Set an error message
- $c->stash->{error_msg} = "Bad username or password.";
+ $c->stash(error_msg => "Bad username or password.");
}
} else {
# Set an error message
- $c->stash->{error_msg} = "Empty username or password.";
+ $c->stash(error_msg => "Empty username or password.");
}
# If either of above don't work out, send to the login page
- $c->stash->{template} = 'login.tt2';
+ $c->stash(template => 'login.tt2');
}
Be sure to remove the
Open C<root/src/books/list.tt2> and add the following lines to the
bottom (below the closing </table> tag):
+ ...
<p>
<a href="[% c.uri_for('/login') %]">Login</a>
<a href="[% c.uri_for(c.controller.action_for('form_create')) %]">Create</a>
# with hex encoding; Generate the 'check_password" method
__PACKAGE__->add_columns(
'password' => {
- data_type => "TEXT",
- size => undef,
encode_column => 1,
encode_class => 'Digest',
encode_args => {salt_length => 10},