From 2bfdaf26ab73aea95e210f044762dd4891855b47 Mon Sep 17 00:00:00 2001 From: Deyan Ginev Date: Fri, 16 Dec 2022 21:07:17 -0500 Subject: [PATCH] avoid definedness warning in eq directive check (#2031) --- lib/LaTeXML/Util/Pack.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/LaTeXML/Util/Pack.pm b/lib/LaTeXML/Util/Pack.pm index 5f91ac44d..a1d492c54 100644 --- a/lib/LaTeXML/Util/Pack.pm +++ b/lib/LaTeXML/Util/Pack.pm @@ -52,12 +52,13 @@ sub unpack_source { while (<$README_FH>) { chomp($_); my ($name, $directive) = split(/\s+/, $_); - if ($directive eq 'toplevelfile') { - # shortcut guessing the top file, the user has provided it explicitly. - $toplevelfile = catfile($sandbox_directory, $name); - } elsif ($directive eq 'ignore') { - my $ignored_filepath = catfile($sandbox_directory, $name); - unlink($ignored_filepath) if -e $ignored_filepath; } } + if ($directive) { + if ($directive eq 'toplevelfile') { + # shortcut guessing the top file, the user has provided it explicitly. + $toplevelfile = catfile($sandbox_directory, $name); + } elsif ($directive eq 'ignore') { + my $ignored_filepath = catfile($sandbox_directory, $name); + unlink($ignored_filepath) if -e $ignored_filepath; } } } return $toplevelfile if $toplevelfile; } # I.2. Without an explicit directive,