summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-08-01 06:20:47 +0200
committerByron Jones <bjones@mozilla.com>2013-08-01 06:20:47 +0200
commitf247762ed9a2c2e2a1e2468a8fe71a6e80f77252 (patch)
tree8ff7c06f48ad69778b2bfbffa1419067691be1fa /Bugzilla/Install
parent0d71c225256de0a0e4f96e33c314efdab032f83f (diff)
downloadbugzilla-f247762ed9a2c2e2a1e2468a8fe71a6e80f77252.tar.gz
bugzilla-f247762ed9a2c2e2a1e2468a8fe71a6e80f77252.tar.xz
Bug 781672: checksetup.pl fails to check the version of the latest Apache2::SizeLimit release
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 45abd402a..420ce2085 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -660,8 +660,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