summaryrefslogtreecommitdiff
path: root/t/cmd
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-09 11:09:53 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:45:09 -0700
commitc388b2138d3ec12be3c986d57c518d41d042e7a1 (patch)
treeb42b8b1ae1eb8e31538562e4b21fcadaca9dbf1d /t/cmd
parent279d09bf89368223d8f0f73d7945e082e8bdaf6a (diff)
downloadperl-c388b2138d3ec12be3c986d57c518d41d042e7a1.tar.gz
lexsub.t: Test state sub defined inside eval
Diffstat (limited to 't/cmd')
-rw-r--r--t/cmd/lexsub.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/cmd/lexsub.t b/t/cmd/lexsub.t
index ebf1188330..24dc5b04ca 100644
--- a/t/cmd/lexsub.t
+++ b/t/cmd/lexsub.t
@@ -8,7 +8,7 @@ BEGIN {
*bar::like = *like;
}
no warnings 'deprecated';
-plan 121;
+plan 122;
# -------------------- our -------------------- #
@@ -286,6 +286,11 @@ sub make_anon_with_state_sub{
}
p(my @a);
}
+{
+ state sub x;
+ eval 'sub x {3}';
+ is x, 3, 'state sub defined inside eval';
+}
# -------------------- my -------------------- #