diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-04-13 17:46:14 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-04-13 17:46:14 +0200 |
commit | 4cbac025fc6e94b1d37edcea7cf1b041827b6446 (patch) | |
tree | 432f2c2284b7dcc677b275d47c2ecc01ad68054a | |
parent | d725139ad63d4dda923bdf2bd36ce6f56ff13a94 (diff) | |
download | bugs-4cbac025fc6e94b1d37edcea7cf1b041827b6446.tar bugs-4cbac025fc6e94b1d37edcea7cf1b041827b6446.tar.gz bugs-4cbac025fc6e94b1d37edcea7cf1b041827b6446.tar.bz2 bugs-4cbac025fc6e94b1d37edcea7cf1b041827b6446.tar.xz bugs-4cbac025fc6e94b1d37edcea7cf1b041827b6446.zip |
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 e27be0f7f..e3184fdb8 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; @@ -220,7 +220,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; @@ -231,8 +231,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; |