diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-13 03:32:02 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-13 03:32:02 +0000 |
commit | 4a925ff6e0a016ce4f2615607e10674d0b0eb2ef (patch) | |
tree | e56ad6e58f6d1de165b95cc3a759ed02fddc92c0 /t | |
parent | 6b35e00972a13cc3d5e641e82fd498a9d9f6a324 (diff) | |
download | perl-4a925ff6e0a016ce4f2615607e10674d0b0eb2ef.tar.gz |
defer "deep recursion" warnings until CXt_SUB context is properly
set up
p4raw-id: //depot/perl@1945
Diffstat (limited to 't')
-rw-r--r-- | t/pragma/warn/pp_hot | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot index ab180949e7..c78b2667e6 100644 --- a/t/pragma/warn/pp_hot +++ b/t/pragma/warn/pp_hot @@ -90,10 +90,14 @@ sub fred { fred() if $a++ < 200 } - -fred() +{ + local $SIG{__WARN__} = sub { + die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/ + }; + fred(); +} EXPECT -Deep recursion on subroutine "main::fred" at - line 5. +ok ######## # pp_hot.c use warning 'recursion' ; |