Skip to content

Commit 2bfdaf2

Browse files
authored
avoid definedness warning in eq directive check (#2031)
1 parent 56a60ed commit 2bfdaf2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

lib/LaTeXML/Util/Pack.pm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ sub unpack_source {
5252
while (<$README_FH>) {
5353
chomp($_);
5454
my ($name, $directive) = split(/\s+/, $_);
55-
if ($directive eq 'toplevelfile') {
56-
# shortcut guessing the top file, the user has provided it explicitly.
57-
$toplevelfile = catfile($sandbox_directory, $name);
58-
} elsif ($directive eq 'ignore') {
59-
my $ignored_filepath = catfile($sandbox_directory, $name);
60-
unlink($ignored_filepath) if -e $ignored_filepath; } }
55+
if ($directive) {
56+
if ($directive eq 'toplevelfile') {
57+
# shortcut guessing the top file, the user has provided it explicitly.
58+
$toplevelfile = catfile($sandbox_directory, $name);
59+
} elsif ($directive eq 'ignore') {
60+
my $ignored_filepath = catfile($sandbox_directory, $name);
61+
unlink($ignored_filepath) if -e $ignored_filepath; } } }
6162
return $toplevelfile if $toplevelfile; }
6263

6364
# I.2. Without an explicit directive,

0 commit comments

Comments
 (0)