When dealing with LWP, don't think of a cookie as being something that you yourself attach to a specific request. Think of a "cookie jar" as a totally separate resource. Separately from your request, you have to add your cookie (via the 'set_cookie' method to HTTP::Cookies) to the cookie jar with the site's information (e.g. foo.com, etc.) and the details/value of the cookie. Then, associate that cookie jar with your LWP::UserAgent object and make your request. Let LWP::UserAgent figure out which cookies it needs to send to the server, based upon the contents of the cookie jar. All you need to do is be sure the cookie jar has the data you expect.
In reply to Re: LWP and slow learners
by Fastolfe
in thread LWP and slow learners
by codemonkey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |