gjwilson21 has asked for the wisdom of the Perl Monks concerning the following question:
I got the following error when i used the Debug mod for LWP.use strict; use WWW::Mechanize; use HTTP::Cookies; use HTTP::Request::Common; use HTTP::Response; use LWP::Debug qw(+); ####################### ####Variables $username, etc ######################## my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); # post login $mech->get($url); $mech->form_name('Form1'); $mech->field('txtUserID' => $username); $mech->field('txtPassword' => $password); #$mech->field('btnSubmit' => 'Submit'); my $response=$mech->click('btnSubmit');
But, When i removed the line decoded_content() from the Mechanize.pm module in my system, i got the correct response. Since it is not correct to modify the modules in CPAN for specific use, can you suggest me some ways of how to overcome this error or how i can rectify this?LWP::UserAgent::new: () LWP::UserAgent::request: () LWP::UserAgent::send_request: GET https://www.abc.com/default.aspx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::collect: read 739 bytes LWP::Protocol::collect: read 4096 bytes LWP::Protocol::collect: read 4096 bytes LWP::Protocol::collect: read 4096 bytes LWP::Protocol::collect: read 2281 bytes HTTP::Cookies::extract_cookies: Set cookie ASP.NET_SessionId => 0rjco5 +45pbrr3gbwmsi5ndjy LWP::UserAgent::request: Simple response: OK Can't locate object method "decoded_content" via package "HTTP::Header +s" at (eval 16) line 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with the module WWW::Mechanize
by Corion (Patriarch) on Jul 20, 2007 at 07:44 UTC | |
by gjwilson21 (Acolyte) on Jul 20, 2007 at 10:21 UTC | |
by Corion (Patriarch) on Jul 20, 2007 at 10:31 UTC | |
by gjwilson21 (Acolyte) on Jul 20, 2007 at 11:50 UTC | |
by Corion (Patriarch) on Jul 20, 2007 at 11:54 UTC | |
|
Re: Problem with the module WWW::Mechanize
by ForgotPasswordAgain (Vicar) on Jul 20, 2007 at 07:46 UTC |