diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-09 11:09:53 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:45:09 -0700 |
commit | c388b2138d3ec12be3c986d57c518d41d042e7a1 (patch) | |
tree | b42b8b1ae1eb8e31538562e4b21fcadaca9dbf1d /t/cmd | |
parent | 279d09bf89368223d8f0f73d7945e082e8bdaf6a (diff) | |
download | perl-c388b2138d3ec12be3c986d57c518d41d042e7a1.tar.gz |
lexsub.t: Test state sub defined inside eval
Diffstat (limited to 't/cmd')
-rw-r--r-- | t/cmd/lexsub.t | 7 |
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 -------------------- # |