[cgiapp] Session name, CGI::Session and CAP::Session

Michael Peters mpeters at plusthree.com
Fri Feb 15 17:38:31 EST 2008


Lee Carmichael wrote:

> I think I might not have been clear. I do want the sessions to be manage per user but I want to alter the session name in the cookie/url based upon the application subclass.

Are you sure you want separate sessions? Or do you just want different locations
in the same session? Will these separate sessions have different expiration
values? Or do you just want to put different things into different "buckets"?

If you do want different sessions then I don't think C::A::P::Session will work
(I could be wrong). If you just want different buckets, then just treat your
session hash as a multi-level hash.

  my $a_session = $self->session->param('A');
  $a_session->{foo} = 'blah';
  my $b_session = $self->session->param('B');
  $b_session->{foo} = 'baz';

-- 
Michael Peters
Plus Three, LP



More information about the cgiapp mailing list