DimOK has asked for the wisdom of the Perl Monks concerning the following question:
my $ua = LWP::UserAgent->new; $ua ->cookie_jar({ file => $full_path_to_script_dir."/cookies", hide_c +ookie2 => 1, autosave => 1, ignore_discard => 1}); #... do serfing....
I'm working with LWP::UserAgent module, and want to accept all cookies, and don't discard them... The code above works fine...
But under some conditions, while script is working i want to discard all expired cookies and keep only those which are valid.
I know that you can do this with HTTP::Cookies object, like $cookie_jar->clear_temporary_cookies, it works, but how can i access to my cookie_jar object, if it was created like this, on the fly from UserAgent?
Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP::UserAgent cookies control
by Corion (Patriarch) on Jul 10, 2009 at 07:12 UTC | |
by DimOK (Novice) on Jul 10, 2009 at 07:22 UTC | |
by spazm (Monk) on Jul 10, 2009 at 22:37 UTC |