Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

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 surveying the Monastery: (9)
As of 2020-07-16 16:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found