summaryrefslogtreecommitdiff
path: root/t/cmd
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-05 10:41:05 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:44:57 -0700
commitf37b842aabb9fad0fb5fe0a4803f30c6ead59c74 (patch)
tree09f3879f91312d09492cd3af741d4994f60ecad8 /t/cmd
parent18f703895eca8c44a852a7e191cb3fdbb65d6891 (diff)
downloadperl-f37b842aabb9fad0fb5fe0a4803f30c6ead59c74.tar.gz
lexsub.t: Add test name, test override from another pkg
The bareword logic in toke.c looks up GVs in various places. This tests that we are bypassing those correctly.
Diffstat (limited to 't/cmd')
-rw-r--r--t/cmd/lexsub.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/cmd/lexsub.t b/t/cmd/lexsub.t
index ef2581e871..328b410464 100644
--- a/t/cmd/lexsub.t
+++ b/t/cmd/lexsub.t
@@ -7,7 +7,7 @@ BEGIN {
*bar::is = *is;
}
no warnings 'deprecated';
-plan 21;
+plan 22;
{
our sub foo { 42 }
@@ -71,8 +71,10 @@ sub bar::c { 43 }
is prototype "::e", '$', 'our sub with proto';
}
{
- # lexical subs (even our) override all keywords
our sub if() { 42 }
my $x = if if if;
- is $x, 42;
+ is $x, 42, 'lexical subs (even our) override all keywords';
+ package bar;
+ my $y = if if if;
+ is $y, 42, 'our subs from other packages override all keywords';
}