Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm
Expression form of "eval" at line 71, column 9. See page 161 of PBP. (Severity: 5) Expression form of "eval" at line 85, column 13. See page 161 of PBP. (Severity: 5) Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
ae546e3ade
commit
0e356b214e
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ sub version_info {
|
|||
my %params = @_;
|
||||
if ($params{'module'}) {
|
||||
return -1 unless grep {m/$params{'module'}/} keys(%$PERL_DEPS);
|
||||
eval "require $params{'module'}";
|
||||
eval {require $params{'module'}};
|
||||
if ($@) {
|
||||
return {$params{'module'} => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, upgrade => 0, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}};
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ sub version_info {
|
|||
else {
|
||||
for (sort keys(%{$PERL_DEPS})) {
|
||||
my $pkg = $_; # $_ holds the string
|
||||
eval "require $pkg";
|
||||
eval {require $pkg};
|
||||
if ($@) {
|
||||
push (@{$self->{'missing_pm'}}, {$_ => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue