summaryrefslogtreecommitdiff
path: root/t/op/lexsub.t
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2013-06-18 09:51:32 +0200
committerFather Chrysostomos <sprout@cpan.org>2013-06-18 06:22:08 -0700
commit07b2687d22462e599adb759b7c0082fb12b3f33d (patch)
treea4ae3bf6ace6feddf89135f0a4cf0532b4ca25e7 /t/op/lexsub.t
parent6daa8d508141a8730166526fd60c532162680a2f (diff)
downloadperl-07b2687d22462e599adb759b7c0082fb12b3f33d.tar.gz
don't crash on deep recursion warnings in lexical subs (#118521)
Diffstat (limited to 't/op/lexsub.t')
-rw-r--r--t/op/lexsub.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/lexsub.t b/t/op/lexsub.t
index d70f2ccf2b..27b6de7326 100644
--- a/t/op/lexsub.t
+++ b/t/op/lexsub.t
@@ -8,7 +8,7 @@ BEGIN {
*bar::like = *like;
}
no warnings 'deprecated';
-plan 134;
+plan 135;
# -------------------- Errors with feature disabled -------------------- #
@@ -695,3 +695,11 @@ eval 'sub not_lexical7 { my @x }';
}
}
}
+
+like runperl(
+ switches => [ '-Mfeature=:all', '-Mwarnings=FATAL,all', '-M-warnings=experimental::lexical_subs' ],
+ prog => 'my sub foo; sub foo { foo } foo',
+ stderr => 1
+ ),
+ qr/Deep recursion on subroutine "foo"/,
+ 'deep recursion warnings for lexical subs do not crash';