diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-12-02 20:52:32 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-02 20:01:24 +0000 |
commit | 2233f375aa37a706e02f773eded0886e392aa503 (patch) | |
tree | 6ded52299120629b0e81838a098c90f860143752 /t/op | |
parent | 117c9db16c535ffa926174c60f260279c800cc8b (diff) | |
download | perl-2233f375aa37a706e02f773eded0886e392aa503.tar.gz |
Shared hash keys
Message-ID: <20011202205232.U21702@plum.flirble.org>
p4raw-id: //depot/perl@13430
Diffstat (limited to 't/op')
-rwxr-xr-x | t/op/tr.t | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..70\n"; +print "1..71\n"; $_ = "abcdefghijklmnopqrstuvwxyz"; @@ -390,4 +390,10 @@ print "ok 69\n"; print "not " unless $a eq "XZY"; print "ok 70\n"; - +# pp_trans needs to unshare shared hash keys +# Used to fail with "Modification of a read-only value attempted" +%a = (N=>1); +foreach (keys %a) { + tr/N/n/; + print +($_ eq 'n' ? '' : "not ") . "ok 71\n"; +} |