diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-10-09 23:01:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-09 23:01:07 +0200 |
commit | 75dbfe1dc03748957f07eca5ac583bedc6fdba76 (patch) | |
tree | 692f90aa15f4e512581cf2cf06a9b240757aaaba /Bugzilla/Config.pm | |
parent | 2ae37c378b50b1ae16c35ce74999b19eb91af07d (diff) | |
download | bugzilla-75dbfe1dc03748957f07eca5ac583bedc6fdba76.tar.gz bugzilla-75dbfe1dc03748957f07eca5ac583bedc6fdba76.tar.xz |
Bug 623384 - Use Module::Runtime instead of eval { require } or eval "use"
Diffstat (limited to 'Bugzilla/Config.pm')
-rw-r--r-- | Bugzilla/Config.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index 85779fa6b..1016d51e4 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -16,6 +16,7 @@ use Bugzilla::Constants; use Bugzilla::Hook; use Data::Dumper; use File::Temp; +use Module::Runtime qw(require_module); # Don't export localvars by default - people should have to explicitly # ask for it, as a (probably futile) attempt to stop code using it @@ -35,7 +36,7 @@ sub _load_params { my %hook_panels; foreach my $panel (keys %$panels) { my $module = $panels->{$panel}; - eval("require $module") || die $@; + require_module($module); my @new_param_list = $module->get_param_list(); $hook_panels{lc($panel)} = { params => \@new_param_list }; } |