[Catalyst] Session example from Tutorial.pod doesn't work?

Rodney Broom rbroom+catalyst at rbroom.com
Sun Feb 5 00:51:44 CET 2006


From: "Jess Robinson" <castaway at desert-island.demon.co.uk>

> Why are 9were) you calling ->login() *again* after having logged in?

The docs in Tutorial.pod didn't seem to indicate that something other than login() was needed. I got the impression that login() was hooked into by a plugin and would then start by looking at the session, but I now see that wasn't the case.


> Is the tutorial not clear on that? Else I will fix it..

The tutorial (like any doc) has several little errors and confusions. I'll be glad to add my editorial input, but should probably be better versed with Catalys first. :)


---
Rodney Broom

> 
> Jess
> 
> 
> On Wed, 1 Feb 2006, catalyst wrote:
> 
> > I'm new to Catalyst and thought I'd start with the tutorial:
> >   http://search.cpan.org/~mstrout/Catalyst-5.63/lib/Catalyst/Manual/Tutorial.pod
> > 
> > I've gotten through most of the "Users and Authenticating" section and it's all working as advertised, but the last part (sessions) doesn't. >From the doc:
> > 
> >     To keep the user logged in, all we need to do is
> >     add the Session modules to our collection, and
> >     the Auth modules will automatically use them;
> > 
> >       use Catalyst qw/-Debug Static::Simple Authentication 
> >         Authentication::Store::Minimal 
> >         Authentication::Credential::Password
> >         Session Session::Store::File Session::State::Cookie/;
> > 
> >     Magic!
> > 
> > Unfortunately, the magic isn't working for me. When I call $c->login after a good login, the session apparently hasn't saved the credentials. What's more, when I look at
> > 
> >   Catalyst::Plugin::Authentication::Credential::Password::login()
> > 
> > I don't see any way that it could be using a session. It always wants a user and password to be explicitly passed or included in the CGI args.
> > 
> > ---
> > Rodney Broom
> > 
> > 
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> > 
> > 
> 
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
> 



More information about the Catalyst mailing list