diff options
author | Steve Grazzini <grazz@pobox.com> | 2003-06-18 15:42:37 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-19 14:08:13 +0000 |
commit | 7ff032551aa263179d4cb6df3dd91502d713e6ba (patch) | |
tree | 7dd25bf874fe4d2842d7e56fa2b9da375cf60df3 /t/op/runlevel.t | |
parent | ca9279baf07d6843f58a31f1ce3ff7dc875faf1a (diff) | |
download | perl-7ff032551aa263179d4cb6df3dd91502d713e6ba.tar.gz |
Re: [perl #17934] tied STDERR and internal warnings
Message-ID: <20030618234237.GA6267@grazzini.net>
p4raw-id: //depot/perl@19819
Diffstat (limited to 't/op/runlevel.t')
-rwxr-xr-x | t/op/runlevel.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/op/runlevel.t b/t/op/runlevel.t index fffe103836..531b862fd8 100755 --- a/t/op/runlevel.t +++ b/t/op/runlevel.t @@ -374,3 +374,36 @@ sub d { } EXPECT 0 +######## +sub TIEHANDLE { bless {} } +sub PRINT { next } + +tie *STDERR, ''; +{ map ++$_, 1 } + +EXPECT +Can't "next" outside a loop block at - line 2. +######## +sub TIEHANDLE { bless {} } +sub PRINT { print "[TIE] $_[1]" } + +tie *STDERR, ''; +die "DIE\n"; + +EXPECT +[TIE] DIE +######## +sub TIEHANDLE { bless {} } +sub PRINT { + (split(/./, 'x'x10000))[0]; + eval('die("test\n")'); + warn "[TIE] $_[1]"; +} +open OLDERR, '>&STDERR'; +tie *STDERR, ''; + +use warnings FATAL => qw(uninitialized); +print undef; + +EXPECT +[TIE] Use of uninitialized value in print at - line 11. |