cookie_jar

Derek J. Balling (dredd@megacity.org)
Tue, 15 Jun 1999 11:05:32 -0700


OK, this may seem very boneheaded, but how come:

$cookie_jar = HTTP::Cookies->new;
$cookie_jar->set_cookie('1','A','A-VALUE','/','.domain.com', 0, 0, 999999, 0 );
$cookie_jar->set_cookie('1','Y','Y-VALUE','/','.domain.com', 0, 0, 999999, 0 );
print "Cookies:\n";
print $cookie_jar->as_string();

... doesn't yield me a cookie jar with two cookies in it? I've tried
replacing the "0"'s with FALSE's, although admittedly, I have no idea what
those boolean values MEAN (are they documented somewhere? certainly not in
the HTTP::Cookies perldoc..., nor is the "version" value... :(  )

I know in theory I can just rip out cookies from response headers, but the
cookies themselves in this case are dynamic (and to retrieve each pair from
a response header would unnecessarily double the workload of the Perl
program in question).

D