Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Problem with Catalyst Tutorial

by ColtsFoot (Chaplain)
on Feb 24, 2006 at 09:05 UTC ( #532496=perlquestion: print w/ replies, xml ) Need Help??
ColtsFoot has asked for the wisdom of the Perl Monks concerning the following question:

I am following Marcus Ramberg's Catalyst Tutorial on CPAN
and get the following error when implementing the login action
Caught exception in tutorial::Controller::Users->logon "Can't locate o +bject method "login" via package "tutorial" at /home/bric1/tutorial/s +cript/../lib/tutorial/Controller/ line 24."
I have the following "use" statements
use Catalyst qw/-Debug Static::Simple Authentication Authentication::Store::Minimal Authentication::Credential::Password/;
My login action code is as follows
sub login : Local { my ($self, $c) = @_; $c->stash->{template} = ''; if(!$c->login()) { $c->stash->{message} = 'Please login.'; } else { $c->stash->{message} = "Welcome " . $c->user->id; } }
Authentication::Credential::Password does have a "login" method
I would be gratefil for any pointers

Comment on Problem with Catalyst Tutorial
Select or Download Code
Replies are listed 'Best First'.
Re: Problem with Catalyst Tutorial
by castaway (Parson) on Feb 24, 2006 at 09:14 UTC
    Do you have that login sub in your, or in a controller? (It should be in a controller) And is the "use Catalyst" in your (It should be)? Do you get a Credential::Password listed in the list of loaded plugins when you start the test server?

    Also note that your error message says "logon" and your code says "login" which is it?


Re: Problem with Catalyst Tutorial
by ghenry (Vicar) on Feb 24, 2006 at 11:23 UTC

    Check out some of the Example Apps and read some of the Advent calender. It's all there ;-)

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a Just ask!!!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://532496]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-11-29 20:30 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls