aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-07-31 13:53:13 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-07-31 13:53:13 +0200
commit33895dda1a40714b087f18f0233c602e10ad1962 (patch)
tree437de1f4f8384d3b780cb54c937b3808cf9508e9 /Bugzilla/Install
parent9bbfca875e449cf66e83f7541b400b26d8244149 (diff)
downloadbugs-33895dda1a40714b087f18f0233c602e10ad1962.tar
bugs-33895dda1a40714b087f18f0233c602e10ad1962.tar.gz
bugs-33895dda1a40714b087f18f0233c602e10ad1962.tar.bz2
bugs-33895dda1a40714b087f18f0233c602e10ad1962.tar.xz
bugs-33895dda1a40714b087f18f0233c602e10ad1962.zip
Bug 655912: install-module.pl is unable to install LWP::UserAgent on Perl <5.8.8, because LWP 6.0 now requires 5.8.8 as a minimum
r/a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/CPAN.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/Install/CPAN.pm b/Bugzilla/Install/CPAN.pm
index df32c40b5..a3f913702 100644
--- a/Bugzilla/Install/CPAN.pm
+++ b/Bugzilla/Install/CPAN.pm
@@ -187,8 +187,20 @@ sub install_module {
if (!$module) {
die install_string('no_such_module', { module => $name }) . "\n";
}
+ my $version = $module->cpan_version;
+ my $module_name = $name;
+
+ if ($name eq 'LWP::UserAgent' && $^V lt v5.8.8) {
+ # LWP 6.x requires Perl 5.8.8 or newer.
+ # As PAUSE only indexes the very last version of each module,
+ # we have to specify the path to the tarball ourselves.
+ $name = 'GAAS/libwww-perl-5.837.tar.gz';
+ # This tarball contains LWP::UserAgent 5.835.
+ $version = '5.835';
+ }
+
print install_string('install_module',
- { module => $name, version => $module->cpan_version }) . "\n";
+ { module => $module_name, version => $version }) . "\n";
if (_always_test($name)) {
CPAN::Shell->install($name);