"Chris Beels" <[EMAIL PROTECTED]> writes:
> I really had to dig to find out about the cookie_jar, it would be nice if
> there were some reference to it on the main LWP page.
With libwww-perl-5.48 we have this section in lwpcook.pod:
=head1 COOKIES
Some sites like to play games with cookies. By default LWP ignore
cookies provided by the servers it visit. You can make it start
collecting them by setting up a cookie jar.
use LWP::UserAgent;
use HTTP::Cookies;
$ua = LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt",
autosave => 1));
# and then send requests just as you used to do
$res = $ua->request(HTTP::Request->new(GET => "http://www.yahoo.no"));
print $res->status_line, "\n";
As you visit sites that send you cookies to keep, then the file
F<lwpcookies.txt"> will grow.