diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-04-13 17:44:59 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-04-13 17:44:59 +0200 |
commit | d82782d4075bdcdbd94319c9ce525249e9b06113 (patch) | |
tree | 3a568e3ca6350894ae713c9531ee5ee53f93e08d | |
parent | 464dad0e3d986addd65235d768554a9753a2c849 (diff) | |
download | bugzilla-d82782d4075bdcdbd94319c9ce525249e9b06113.tar.gz bugzilla-d82782d4075bdcdbd94319c9ce525249e9b06113.tar.xz |
Bug 1153027: Bugzilla->feature incorrectly checks Perl modules
r=dkl a=glob
-rw-r--r-- | Bugzilla.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 4b19301aa..21b086cbd 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -31,7 +31,7 @@ use Bugzilla::Extension; use Bugzilla::Field; use Bugzilla::Flag; use Bugzilla::Install::Localconfig qw(read_localconfig); -use Bugzilla::Install::Requirements qw(OPTIONAL_MODULES); +use Bugzilla::Install::Requirements qw(OPTIONAL_MODULES have_vers); use Bugzilla::Install::Util qw(init_console include_languages); use Bugzilla::Memcached; use Bugzilla::Template; @@ -234,7 +234,7 @@ sub feature { foreach my $package (@{ OPTIONAL_MODULES() }) { foreach my $f (@{ $package->{feature} }) { $feature_map->{$f} ||= []; - push(@{ $feature_map->{$f} }, $package->{module}); + push(@{ $feature_map->{$f} }, $package); } } $cache->{feature_map} = $feature_map; @@ -245,8 +245,8 @@ sub feature { } my $success = 1; - foreach my $module (@{ $feature_map->{$feature} }) { - eval "require $module" or $success = 0; + foreach my $package (@{ $feature_map->{$feature} }) { + have_vers($package) or $success = 0; } $cache->{feature}->{$feature} = $success; return $success; |