develooper Front page | perl.libwww | Postings from April 2001

"Can't locate object method "epath" via package "URI::http""

Thread Next
Steve Borruso
April 8, 2001 19:14
"Can't locate object method "epath" via package "URI::http""
Message ID:

I've been trying to debug why I can't issue a form -> click and finally
started debugging it as a standalone script (as opposed to viewing CGI
output in a browser, duh)

I get the following error msg when I issue the form->click .....

Can't locate object method "epath" via package "URI::http"
 at /usr/local/lib/perl5/site_perl/5.005/HTTP/

I'm using the same User Agent that I defined earlier in my script that
used to pull several pages (including the form I'm trying to submit)
using cookies.
My latest script is attached below.

I saw reference to this problem in the libwww mailing list archives.It
to try and "change "epath" to "path" in the file". Not sure
to do this, I use a web hosting service.

Any assistance is appreciated.
Steve Borruso

#!/usr/bin/perl -w
use strict;
use URI::URL;
use LWP::Simple ;
use HTML::TokeParser;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;
use HTML::Form;

my $CustCookieFile = "/mydir/BidVilleCookie.txt";
my  $ua = LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new(file => "$CustCookieFile", autosave
=> 1));

my  $r = $ua->simple_request(POST "",
                              # url => '',
                               nickname => 'xxx',
                               password => 'xxx',
                               return => '',
                              # 'Login!' => 'Login!',
while ($r->is_redirect) {
   my $u = $r->header('location') or die "missing location: ",
   print "redirecting to $u\n";
   $r = $ua->simple_request(GET $u);

my $bidville_logo_items = '3279401';
my $BV_Update_item =
'' .
$bidville_logo_items ;

my $res = $ua->request(HTTP::Request->new(GET => "$BV_Update_item"));
my $html = $res->content;

my $form = HTML::Form->parse($html,'');

print  $form->inputs ;
print  $form->form ;

my $name = 'submit';
my $submit = $form->find_input($name);

my $r2  = $ua->simple_request($submit->click($form));
my $newhtml = $r2->content;

print "heres the new html $newhtml";

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About