Seumas has asked for the wisdom of the Perl Monks concerning the following question:
In the more verbose example, I could add expires => '+1M', if I wanted. But I can not find a way to accomplish setting a cookie expiration time with the short CGI::Session method above. I tried the following, which did not work:$cookie = new CGI::Cookie(-name=>'CGISESSID', -value=>$session->id); print $cgi->header(-cookie=>$cookie);
I've looked through the CGI::Session code and could not find anything that addresses this but it seems common enough that there has to be something simple that will allow me to use the shorter header() method while still applying an expiration period.$session->header(expires => '+1M')
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI::Session and cookie expiration
by amt (Monk) on Oct 18, 2004 at 17:33 UTC | |
Re: CGI::Session and cookie expiration
by !1 (Hermit) on Oct 18, 2004 at 17:25 UTC | |
by amt (Monk) on Oct 18, 2004 at 17:36 UTC | |
by Seumas (Curate) on Oct 18, 2004 at 22:43 UTC | |
by bmann (Priest) on Oct 18, 2004 at 21:43 UTC | |
by !1 (Hermit) on Oct 19, 2004 at 14:29 UTC | |
by bmann (Priest) on Oct 19, 2004 at 16:08 UTC |