use warnings 'closed' ;
close STDIN ;
print STDIN "anc";
+opendir STDIN, ".";
+print STDIN "anc";
+closedir STDIN;
no warnings 'closed' ;
print STDIN "anc";
+opendir STDIN, ".";
+print STDIN "anc";
EXPECT
print() on closed filehandle main::STDIN at - line 4.
+print() on closed filehandle main::STDIN at - line 6.
+(Are you trying to call print() on dirhandle main::STDIN?)
########
# pp_hot.c [pp_rv2av]
use warnings 'uninitialized' ;
########
# pp_hot.c [Perl_do_readline]
use warnings 'closed' ;
-close STDIN ; $a = <STDIN> ;
+close STDIN ; $a = <STDIN> ;
+opendir STDIN, "." ; $a = <STDIN> ;
+closedir STDIN;
no warnings 'closed' ;
+opendir STDIN, "." ; $a = <STDIN> ;
$a = <STDIN> ;
EXPECT
readline() on closed filehandle main::STDIN at - line 3.
+readline() on closed filehandle main::STDIN at - line 4.
+(Are you trying to call readline() on dirhandle main::STDIN?)
########
# pp_hot.c [Perl_do_readline]
use warnings 'io' ;