js1 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I've written this quick script which works until I put in the redirect_ok call to get it to follow a 302.
use WWW::Mechanize; use CGI; my $agent=WWW::Mechanize->new(); $agent->add_header( Cookie => $ENV{'HTTP_COOKIE'} ); $agent->get('http://lhrbod-apdhz001.ad.com/ess/SignUpAsEmployee.aspx') +; $agent->redirect_ok(); print CGI::header(); print $agent->content();
The logs say Can't call method "value" on an undefined value at /opt/perl-5.8.3/lib/site_perl/5.8.3/WWW/Mechanize.pm line 1052. Am I supposed to supply some parameters to redirect_ok?
Thanks for any help.
js1.
2006-01-06 Retitled by planetscape, as per Monastery guidelines
Original title: 'redirect_ok'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem calling WWW::Mechanize redirect_ok
by Joost (Canon) on Jan 04, 2006 at 22:20 UTC | |
by js1 (Monk) on Jan 05, 2006 at 12:59 UTC | |
by Joost (Canon) on Jan 05, 2006 at 13:12 UTC | |
by js1 (Monk) on Jan 05, 2006 at 20:00 UTC | |
|
Re: Problem calling WWW::Mechanize redirect_ok
by mikeock (Hermit) on Jan 04, 2006 at 22:21 UTC | |
by js1 (Monk) on Jan 04, 2006 at 22:49 UTC | |
by mikeock (Hermit) on Jan 04, 2006 at 22:53 UTC | |
|
Re: Problem calling WWW::Mechanize redirect_ok
by traveler (Parson) on Jan 04, 2006 at 23:45 UTC | |
|
Re: Problem calling WWW::Mechanize redirect_ok
by kulls (Hermit) on Jan 05, 2006 at 04:51 UTC | |
by js1 (Monk) on Jan 06, 2006 at 14:16 UTC |