Skip to content

Commit

Permalink
check if $b{$name} is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
qbit committed Apr 14, 2022
1 parent a1cf119 commit c8553ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg.pl
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ sub createIDX {

sub run {
my ( $cmd, $name ) = @_;
return if $b{$name};
return if defined $b{$name};

my $module = "OpenBSD::Pkg\u$cmd";

## no critic
eval "require $module";
## use critic

if ($@) {
die $@;
}
Expand Down

0 comments on commit c8553ad

Please sign in to comment.