Hi,

I have just added some code in my handler.pl to expire idle sessions
after 1 hour and thought I'd submit it to the list for review. The
'critik' $session key contains all login details.

        my $m = $ah->prepare_request($r);

    my $status =  $m->exec;

    my $time = time();
    if ($time - $HTML::Mason::Commands::session{TIMESTAMP} > 3600) {
        delete($HTML::Mason::Commands::session{critik})
    }
    $HTML::Mason::Commands::session{TIMESTAMP} = $time;


    untie %HTML::Mason::Commands::session;

    return $status;

Is that the best way to do it?

Thanks,

-- 
http://www.lesculturelles.net

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to