On 2005-12-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> sub cgiapp_postrun {
>    my $self = shift;
>    $self->set_session(); #set the session
> }
>
> sub set_session {
>    my $self = shift;
>    $self->session->param(user_name     => $user_name);
>    $self->session->param(user_id       => $user_id);
>    $self->session->param(logged_in     => 1); #persistent
>
> open (DEBUG, ">debug2.txt") or die "debug error: $!";
> print DEBUG "logged_in:". $self->session->param('logged_in')."\n"; close
> DEBUG;
> }

I recommended using postrun for this, becaues it runs after every run
mode in the module, but is only needed one once: After you have logged
in.  I would find it more efficient and logicial to then call
set_session() at the end of the login processing run mode. 

"postrun" tends to be rarely used my experience.

The one related thing I have done is to call "$self->session->flush()"
in the teardown() phase. I think that should happen automatically.


    Mark

-- 
http://mark.stosberg.com/ 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to