To: | bug-CPANPLUS [...] rt.cpan.org |
From: | Richard Soderberg <perl [...] crystalflame.net> |
Subject: | LWP error reporting doesn't distinguish between remote server error and local LWP error |
Date: | Sun, 6 Jun 2004 06:46:41 -0700 |
Fetch failed! HTTP response code: 500 [500 Cannot write to
'/Users/coral/.cpanplus/authors/id/E/EL/ELIZABETH/Devel-Required
-0.06.tar.gz-15139': Permission denied] in
CPANPLUS::Internals::Fetch::_lwp_get at Sun Jun 6 06:41:03 2004 at
/Library/Perl/5.8.1/CPANPLUS/Internals/Fetch.pm line 351
To figure out what was broken with my LWP installation, I edited
Internals/Fetch.pm as follows:
--- /Library/Perl/5.8.1/CPANPLUS/Internals/Fetch.pm Sun Jun 6
06:40:41 2004
+++ lib/CPANPLUS/Internals/Fetch.pm Sun Oct 5 09:26:35 2003
@@ -350,7 +350,7 @@
} else {
$err->trap(
error => loc("Fetch failed! HTTP response code: %1
[%2]", $res->code,
- HTTP::Status::status_message($res->code)),
+ $res->status_line),
);
return undef;
}
May I suggest the following?
--- /Library/Perl/5.8.1/CPANPLUS/Internals/Fetch.pm Sun Jun 6
06:40:41 2004
+++ lib/CPANPLUS/Internals/Fetch.pm Sun Oct 5 09:26:35 2003
@@ -349,8 +349,9 @@
return $args->{path}->{local};
} else {
$err->trap(
- error => loc("Fetch failed! HTTP response code: %1
[%2]", $res->code,
- HTTP::Status::status_message($res->code)),
+ error => loc("Fetch failed! HTTP response code: %1 %2
[%3]", $res->code,
+ HTTP::Status::status_message($res->code),
+ $res->status_line),
);
return undef;
}
- R.