lampros21_7 has asked for the wisdom of the Perl Monks concerning the following question:
Missing base argument at C:/Perl/site/lib/HTTP/Response.pm line 93
The code around where it points me to in that module is
if ($req) { # if $base is undef here, the return value is effectively # just a copy of $self->request->uri. return $HTTP::URI_CLASS->new_abs($base, $req->uri); }
My problematic code is:
my $url_name; my $base_url = "http://www.perlmonks.com/"; for (my $c = 0; $c<=$rowcount; $c++) { $webcrawler->get($url_name); my @links = map { $_->[0] } $webcrawler->links; # get Links my $ext1 = ".pdf"; my $ext2 = ".doc"; my $ext3 = ".ps"; my $ext4 = ".txt"; @links = map { URI->new_abs( $_, $base_url ) } @links; @links = map { /^$base_url/ ? $_ : () } @links; @links = grep(!/$ext1|$ext2|$ext4|$ext3$/, @links);
There is more code but am pretty certain the fault comes from somewhere in here. I can't figure out the problem. Can anyone help? Thanks for looking
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange error from Response.pm
by graff (Chancellor) on Mar 10, 2006 at 02:39 UTC |