[Catalyst] Using a session in catalyst

Yuval Kogman nothingmuch at woobling.org
Mon Jan 23 23:58:02 CET 2006


Hi,

	package MyApp;

	use Catalyst qw/
		Session
		Session::Store::FastMmap
		Session::State::Cookie
	/;

Note, this is *NOT* Session::FastMmap - an older plugin.

Then just say

	$c->session->{foo}

to acccess the data. Note that this is not $c->{session}{foo} or
anything like that - use the method call or it won't work.

As for $c->session->{user} = $username - there's
Catalyst::Plugin::Authentication for all that.

The relevant introductory material is:

	http://catalyst.perl.org/calendar/2005/15

And then for the $username stuff:

	http://catalyst.perl.org/calendar/2005/14

Please pay more attention to the documentation before posting. It is
evident from your posts that you guys are pretty much just skimming.

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me climbs a brick wall with his fingers: 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/20060124/c158145f/attachment.pgp


More information about the Catalyst mailing list