From c8553ad4c5d2c1ad112fd72bd88047b146fff9cd Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Wed, 13 Apr 2022 20:31:25 -0600 Subject: [PATCH] check if $b{$name} is defined --- pkg.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg.pl b/pkg.pl index b54b927..44393f8 100755 --- a/pkg.pl +++ b/pkg.pl @@ -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 $@; }