neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
# set cookie Apache::Cookie->new( $r, name => 'license_session', value => $sid, path => '/', expires => '30m', )->bake;
What I can't understand I how to get the cookie, and its data, back?
Update In more detail, here is my main code:
$sid and $csid should be the same. However, they are not. Can anyone tell me why?<%args> $uname => 'x' $passwd => 'x' $url </%args> <%perl> use warnings; use strict; use lib "/var/www/itiv/modules"; use Mapps::Session; use Mapps::Auth; ########################## # try to authenticate ########################## my ($auth, $uid) = Mapps::Auth::auth($uname, $passwd); if ($auth == 1){ my $s = Mapps::Session->new(); my $sid = $s->new_session($uid); #my $sid = $s->sid(); # set cookie Apache::Cookie->new( $r, name => 'session', value => $sid, path => '/', expires => '30m', )->bake; #print "sid = ".$sid; my %cookies = Apache::Cookie->fetch; my $csid = $cookies{'session'}->value; print " sid = ".$sid; print "<br>csid = ".$csid; exit;
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting data using Apache::Cookie
by Fletch (Bishop) on Aug 04, 2004 at 18:50 UTC | |
by neilwatson (Priest) on Aug 04, 2004 at 20:09 UTC | |
by Fletch (Bishop) on Aug 04, 2004 at 20:52 UTC | |
by neilwatson (Priest) on Aug 04, 2004 at 21:11 UTC |