summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-15 17:12:01 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-15 17:12:01 +0000
commitadc51b978ed1b2e9d4512c9bfa80386ac917d05a (patch)
treeb99a983e47755202eb2ff28483216ffa91daecf1 /t
parent4634a855caf7cb9c97bd7d7c7bdb72d61fd2e9c0 (diff)
downloadperl-adc51b978ed1b2e9d4512c9bfa80386ac917d05a.tar.gz
Don't autovivify stashes as soon as the lexer sees them.
This makes defined %foo::bar:: work again. Add tests for it, remove note in perldelta about having broken it. p4raw-id: //depot/perl@26370
Diffstat (limited to 't')
-rw-r--r--t/op/stash.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/stash.t b/t/op/stash.t
index 0cd7ebf5e7..744177511d 100644
--- a/t/op/stash.t
+++ b/t/op/stash.t
@@ -7,7 +7,7 @@ BEGIN {
require "./test.pl";
-plan( tests => 2 );
+plan( tests => 8 );
# Used to segfault (bug #15479)
fresh_perl_is(
@@ -24,3 +24,15 @@ fresh_perl_is(
{ switches => [ '-w' ] },
q(Insert a non-GV in a stash, under warnings 'once'),
);
+
+ok( !defined %oedipa::maas::, q(stashes aren't defined if not used) );
+ok( !defined %{"oedipa::maas::"}, q(- work with hard refs too) );
+
+ok( defined %tyrone::slothrop::, q(stashes are defined if seen at compile time) );
+ok( defined %{"tyrone::slothrop::"}, q(- work with hard refs too) );
+
+ok( defined %bongo::shaftsbury::, q(stashes are defined if a var is seen at compile time) );
+ok( defined %{"bongo::shaftsbury::"}, q(- work with hard refs too) );
+
+package tyrone::slothrop;
+$bongo::shaftsbury::scalar = 1;