summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-12-02 17:00:20 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-12-02 17:00:20 +0100
commit428fbf98c5bda12ab2bc018246b6a9d27f628fd1 (patch)
tree79b5e24818baa5b89735f1399318bd2708ed16d3 /Bugzilla/Install
parentc6528d5819e6503c6772a3a8a17029cb892519b0 (diff)
downloadbugzilla-428fbf98c5bda12ab2bc018246b6a9d27f628fd1.tar.gz
bugzilla-428fbf98c5bda12ab2bc018246b6a9d27f628fd1.tar.xz
Bug 781672: checksetup.pl fails to check the version of the latest Apache2::SizeLimit release (it throws "Invalid version format (non-numeric data)")
r=dkl a=justdave
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Requirements.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index 83723b327..782341513 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -659,8 +659,15 @@ sub have_vers {
Bugzilla::Install::Util::set_output_encoding();
# VERSION is provided by UNIVERSAL::, and can be called even if
- # the module isn't loaded.
- my $vnum = $module->VERSION || -1;
+ # the module isn't loaded. We eval'uate ->VERSION because it can die
+ # when the version is not valid (yes, this happens from time to time).
+ # In that case, we use an uglier method to get the version.
+ my $vnum = eval { $module->VERSION };
+ if ($@) {
+ no strict 'refs';
+ $vnum = ${"${module}::VERSION"};
+ }
+ $vnum ||= -1;
# CGI's versioning scheme went 2.75, 2.751, 2.752, 2.753, 2.76
# That breaks the standard version tests, so we need to manually correct