summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2016-05-19 06:08:12 -0700
committerFather Chrysostomos <sprout@cpan.org>2016-05-19 06:10:07 -0700
commit38fe8a04ecde2def590d5181d73afe17f06f9789 (patch)
tree68afed6206b7068b25dfc6d14af79d58a2c7deae
parent1d6c37fc2b29d8f450caa739507858741a5ae58b (diff)
downloadperl-38fe8a04ecde2def590d5181d73afe17f06f9789.tar.gz
[perl #123367] Test my sub defined in BEGIN{eval}
This accidentally started working in v5.21.6-197-g0f94cb1.
-rw-r--r--t/op/lexsub.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/lexsub.t b/t/op/lexsub.t
index de4c074178..19a99fe4e0 100644
--- a/t/op/lexsub.t
+++ b/t/op/lexsub.t
@@ -7,7 +7,7 @@ BEGIN {
*bar::is = *is;
*bar::like = *like;
}
-plan 151;
+plan 152;
# -------------------- Errors with feature disabled -------------------- #
@@ -760,6 +760,10 @@ not_lexical11();
my sub x;
eval 'sub x {3}';
is x, 3, 'my sub defined inside eval';
+
+ my sub z;
+ BEGIN { eval 'sub z {4}' }
+ is z, 4, 'my sub defined in BEGIN { eval "..." }';
}
{