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
In reply to Problem with the module WWW::Mechanize by gjwilson21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |