stat _ was producing an erroneous warning about an unopened filehandle
with _. But _ isn’t a real filehandle and is special-cased, so it
shouldn’t warn.
See also commit
8080e3c8.
PL_laststatval = -1;
}
}
+ if (PL_laststatval < 0 && !havefp) report_evil_fh(gv);
}
if (PL_laststatval < 0) {
- if (!havefp) report_evil_fh(gv);
max = 0;
}
}
}
-plan tests => 112;
+plan tests => 113;
my $Perl = which_perl();
}
}
+# [perl #71002]
+{
+ local $^W = 1;
+ my $w;
+ local $SIG{__WARN__} = sub { warn shift; ++$w };
+ stat 'prepeinamehyparcheiarcheiometoonomaavto';
+ stat _;
+ is $w, undef, 'no unopened warning from stat _';
+}
+
END {
chmod 0666, $tmpfile;
unlink_all $tmpfile;