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

Yuval Kogman nothingmuch at woobling.org
Thu Feb 2 19:39:48 CET 2006


On Thu, Feb 02, 2006 at 10:15:34 -0700, catalyst wrote:
> > We had a problem like that recently. Are you possibly setting
> > YourApp->config *after* calling ->setup? that caused problems when
> > the default values (which are filled in at setup time) are zapped.
> 
> Nope, config() then setup().
> 
> > Please attach logs if this is not the case
> 
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] **********************************
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] * Request 6 (0.013/s) [17708]
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] **********************************
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] Found sessionid "658591c87927791bc15cc2b731950bee09876317" in cookie
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] "GET" request for "users/login" from "192.168.1.100"
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] Path is "users/login"
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] Restored session "658591c87927791bc15cc2b731950bee09876317"
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] Can't login a user without a user object or user ID param
>   [Tue Jan 31 05:25:48 2006] [catalyst] [debug] Rendering template "userlogin.tt"
>   [Tue Jan 31 05:25:48 2006] [catalyst] [info] Request took 0.082784s (12.080/s)
>   .------------------------------------------------------------------+-----------.
>   | Action                                                           | Time      |
>   +------------------------------------------------------------------+-----------+
>   | /users/login                                                     | 0.000821s |
>   | /end                                                             | 0.008623s |
>   |  -> tutorial::View::TToolkit->process                            | 0.004060s |
>   '------------------------------------------------------------------+-----------'

I'm guessing your call to $c->login is unconditional...

Please try to dump

	$c->user

and

	$c->session

They should contain clues.

To find out if a user is logged in to your app, use

	$c->user_exists

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060202/736fbed0/attachment.pgp


More information about the Catalyst mailing list