ibanix has asked for the wisdom of the Perl Monks concerning the following question:
If I put debug info in, I can see that the cookie is being created, but not read; on the next refresh or call of the script the cookie is read.$new_cookie = cookie_creator_sub() if (some condition); .... if ($new_cookie) { print $q->header(-cookie=>$new_cookie); } else { print $q->header(); } my %cookie = $q->cookie('info'); .... sub cookie_creator_sub { ..... my %cookie_info = ( 'tempfile' => $tempfile, 'timestamp' => $timestamp, ); $newcookie = $q->cookie(-name=>'info', -value=>\%cookie_info, ); return $newcookie; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading and writing a CGI cookie in the same page
by VSarkiss (Monsignor) on Feb 21, 2003 at 02:02 UTC | |
|
Re: reading and writing a CGI cookie in the same page
by shotgunefx (Parson) on Feb 21, 2003 at 02:07 UTC | |
|
Re: reading and writing a CGI cookie in the same page
by dws (Chancellor) on Feb 21, 2003 at 02:52 UTC | |
|
Re: reading and writing a CGI cookie in the same page
by Cabrion (Friar) on Feb 21, 2003 at 02:08 UTC | |
by PodMaster (Abbot) on Feb 21, 2003 at 02:20 UTC |