[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: mod_perl2: handle session without CGI::Session
From:       "Perrin Harkins" <perrin () elem ! com>
Date:       2008-05-27 22:09:18
Message-ID: 66887a3d0805271509n9aad9fcmd416e8c30fafbb49 () mail ! gmail ! com
[Download RAW message or body]

On Mon, May 26, 2008 at 10:48 PM, mome <pinate11@yahoo.com> wrote:
> When passing Apache2::Request object to CGI::Session->new() as the following
>
> sub authen_handler{
> my $self = shift;
>  my $req = Apache2::Request->new($r);
>  my $session=CGI::Session->new(undef,$req,{Directory=>
> $TMP_SESSION_FOLDER});
>  my $sesName = $session->name; # this line cause error
>  my $sesID = $session->id;
> ...
> ...}

I'm not sure if CGI::Session works with Apache2::Request.  I'd suggest
you either get the session ID yourself.  You can create your own CGI
object instead ( CGI->new($r) ) and pass that in, but it just wastes
resources.  You're better off handling the cookie yourself.

- Perrin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic