2 # See if autoloading of protocol schemes work
7 require LWP::UserAgent;
8 # note no LWP::Protocol::file;
13 print "Trying to fetch '" . URI->new($url)->file . "'\n";
15 my $ua = new LWP::UserAgent; # create a useragent to test
16 $ua->timeout(30); # timeout in seconds
18 my $request = HTTP::Request->new(GET => $url);
20 my $response = $ua->request($request);
21 if ($response->is_success) {
23 print $response->as_string;
27 print $response->error_as_HTML;