Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for your patience, Carl$ub->cookie_jar = $ua->cookie_jar;
use HTTP::Cookies; .. $ua = LWP::UserAgent->new; $ua->agent($MOZILLA); $ua->cookie_jar(new HTTP::Cookies); $res = $ua->request(GET $url); #the $ua->cookie_jar is set hereafter $post = &fillForm(\$res, \%FW, $form); # fillout form # Creating a new UserAgent $ub $ub = LWP::UserAgent->new; $ub->agent($MOZILLA); $ub->cookie_jar(new HTTP::Cookies); $ub->cookie_jar = $ua->cookie_jar; #crash # now this cookie of $ub has to be the same as of $ua # I just don't get it and # I don't want to save and load a file due to permissions $res = $ub->request($post); $post = &fillForm(\$res,\%FW,'msgO',$nSMS); # fillout next Form # create 3rd UserAgent $uc $uc = LWP::UserAgent->new; $uc->agent($MOZILLA); $uc->cookie_jar(new HTTP::Cookies); $uc->cookie_jar = $ub->cookie_jar; #crash # Again this cookie must be the same as # the 2 others before $res = $uc->request($post); ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: How can I set: $ub->cookie = $ua->cookie ?
by merlyn (Sage) on Aug 22, 2002 at 15:54 UTC | |
by Anonymous Monk on Aug 22, 2002 at 17:19 UTC | |
|
Re: How can I set: $ub->cookie = $ua->cookie ?
by fglock (Vicar) on Aug 22, 2002 at 15:30 UTC |