summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-06 13:29:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-06 13:29:22 +0000
commit0b2c215abcaa8ddb7711b25e83c02552d8bddbc5 (patch)
treea8ecc145f9159302801a565e9e53f3ed48984f1b /t
parentc39e6ab0a7545b7ae425e21f045aa689291b268e (diff)
downloadperl-0b2c215abcaa8ddb7711b25e83c02552d8bddbc5.tar.gz
Add a test for #16431, and document Dave's campaign
against localised hash element bugs. p4raw-id: //depot/perl@16432
Diffstat (limited to 't')
-rwxr-xr-xt/op/tie.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t
index 9a651555fc..f8f2322632 100755
--- a/t/op/tie.t
+++ b/t/op/tie.t
@@ -202,3 +202,12 @@ EXPECT
tie FH, 'main';
EXPECT
+########
+# correct unlocalisation of tied hashes (patch #16431)
+use Tie::Hash ;
+tie %tied, Tie::StdHash;
+{ local $hash{'foo'} } print "exist1\n" if exists $hash{'foo'};
+{ local $tied{'foo'} } print "exist2\n" if exists $tied{'foo'};
+{ local $ENV{'foo'} } print "exist3\n" if exists $ENV{'foo'};
+EXPECT
+