[Catalyst] using Authentication plugin

Hang Sun sunh11373 at hotmail.com
Tue Jan 24 02:00:26 CET 2006


Hi, I try to use the Authentication plugin by following the instruction. my code looks like: =====package myapp; use strict;use warnings; use Catalyst qw/-Debug  Authentication  Authentication::Store::Minimal  Authentication::Credential::Password  /; ## Set flags and add plugins for the application##         -Debug: activates the debug mode for very useful log messages# Static::Simple: will serve static files from the applications root directory#use Catalyst qw/-Debug Static::Simple/; our $VERSION = '0.01'; ## Configure the application#__PACKAGE__->config->{name} = 'plmessenger'; __PACKAGE__->config->{authentication}{users} = {    userx => {        password => "userx",        roles    => [qw/admin/],    },}; ## Start the application#__PACKAGE__->setup; ## Output a friendly welcome message#sub default : Private {    my ( $self, $c ) = @_;    $c->response->body( $c->welcome_message );} sub login : Global {    my ( $self, $c ) = @_;     $c->login( 'userx', 'userx' );}  1;======  But the result complains: Caught exception "Can't locate object method "login" via package "myapp" at C:/site/myapp/lib/myapp.pm line xxx."  Do I miss anything in configuration?  Thanks         
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060123/ba34e861/attachment-0001.htm


More information about the Catalyst mailing list