diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-06-04 13:10:41 -0700 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2011-09-05 01:22:43 +0200 |
commit | f301467e64e429e8fa4ba219535cbd449995274d (patch) | |
tree | 64d482a6dc967df31a650ded6c4c673003f47681 /t/op/tie.t | |
parent | 384dc8b74963d6271aad25fb5e2e20e87f23d844 (diff) | |
download | perl-f301467e64e429e8fa4ba219535cbd449995274d.tar.gz |
Stop localised ties from becoming ro when COW
Diffstat (limited to 't/op/tie.t')
-rw-r--r-- | t/op/tie.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t index b485f62d62..0b53b140ef 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -1014,3 +1014,19 @@ print "ok\n"; EXPECT ok +######## +# +# Localising a tied COW scalar should not make it read-only. + +sub TIESCALAR { bless [] } +sub FETCH { __PACKAGE__ } +sub STORE {} +tie $x, ""; +"$x"; +{ + local $x; + $x = 3; +} +print "ok\n"; +EXPECT +ok |