diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-05-27 20:25:30 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-05-27 20:25:30 +0000 |
commit | f62cb720259c484e37beef31bf5247e5e150815a (patch) | |
tree | 8efae199b1e98188092ab8a95537d7c94e0ae12d /t | |
parent | efe6c6a19b7c016fee2f63a93a8d6f569c5793ba (diff) | |
download | perl-f62cb720259c484e37beef31bf5247e5e150815a.tar.gz |
Fix a warning bug in Perl_report_evil_fh (didn't report
stashes correctly.) Partial info is better than wrong info.
p4raw-id: //depot/perl@16821
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/pp_hot | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/lib/warnings/pp_hot b/t/lib/warnings/pp_hot index 7df18afb2c..c008dd5f10 100644 --- a/t/lib/warnings/pp_hot +++ b/t/lib/warnings/pp_hot @@ -115,6 +115,23 @@ print $fh "Shouldn't print anything, but shouldn't SEGV either\n"; EXPECT print() on closed filehandle at - line 7. ######## +# pp_hot.c [pp_print] +package foo; +use warnings 'closed'; +open my $fh1, "nonexistent"; +print $fh1 42; +open $fh2, "nonexistent"; +print $fh2 42; +open $bar::fh3, "nonexistent"; +print $bar::fh3 42; +open bar::FH4, "nonexistent"; +print bar::FH4 42; +EXPECT +print() on closed filehandle $fh1 at - line 5. +print() on closed filehandle $fh2 at - line 7. +print() on closed filehandle $fh3 at - line 9. +print() on closed filehandle FH4 at - line 11. +######## # pp_hot.c [pp_rv2av] use warnings 'uninitialized' ; my $a = undef ; |