[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] LWP: Missing file path_query.al ?



Hi all,

I have a problem using the following example from lwpcook.pm (see also LWP.pm):

------------------
#!perl -w

  # Create a user agent object
  use LWP::UserAgent;
  $ua = new LWP::UserAgent;
  $ua->agent("AgentName/0.1");

# Create a request
  my $req = new HTTP::Request('GET' => 'http://1.2.3.4/index.html'); # ***
  $req->header('Accept' => 'text/html');

  # Pass request to the user agent and get a response back
  my $res = $ua->request($req);

  # Check the outcome of the response
  if ($res->is_success) {
      print $res->content;
  } else {
      print "Error: " . $res->status_line . "\n";
  }
------------------
*** Please note, that this URL points to a personal web server running on
my Mac.

Running this script yields the error message (no matter whether the server
is running or not):

   Error: 500 # Can't locate auto/URI/URL/http/path_query.al in @INC.
   File 'Datenpladde:MacPerl Ÿ:site_perl:AutoLoader.pm'; Line 38

   File 'Datenpladde:MacPerl Ÿ:site_perl:LWP:Protocol:http.pm'; Line 80

First, I've tried to locate the file path_query.al myself, but it is really
missing. Then I've read the Autoloader.pm pod. To my understanding of the
autoloader mechanism, there must be a definition of a subroutine called
"path_query" in the module :URI:URL:http.pm, from which the autosplit
function will create the file path_query.al in the :auto:URI:URL:http:
folder. This file will later on be used to (auto-) load the missing
subroutine. But the module :URI:URL:http.pm doesn't contain such a
definition.

So what's going wrong here? Is this file really missing or is the error
message wrong? Is there a module that contains the definition of
"path_query"? Any help would be much appreciated. (Please keep it simple,
I'm not a Perl guru ;-) .)

Best regards

--Thomas
(Bremen, Germany)



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org