diff options
Diffstat (limited to 't/pragma/warn/pp_hot')
-rw-r--r-- | t/pragma/warn/pp_hot | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot index 7e19dc5c94..312f7da9b2 100644 --- a/t/pragma/warn/pp_hot +++ b/t/pragma/warn/pp_hot @@ -83,10 +83,17 @@ Filehandle main::FOO opened only for output at - line 8. 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' ; @@ -124,11 +131,16 @@ Reference found where even-sized list expected at - line 3. ######## # 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' ; |