develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #114848] maint-5.14: d5c6c69 fa819c1 3e89ba1 a991bd3 Storable/Internals::SvREADONLY/SvIsCOW

Thread Previous
From:
Father Chrysostomos via RT
Date:
September 11, 2012 14:02
Subject:
[perl #114848] maint-5.14: d5c6c69 fa819c1 3e89ba1 a991bd3 Storable/Internals::SvREADONLY/SvIsCOW
Message ID:
rt-3.6.HEAD-11172-1347397370-891.114848-15-0@perl.org
On Tue Sep 11 10:03:01 2012, dom wrote:
> On Tue, Sep 11, 2012 at 09:53:40AM -0700, Father Chrysostomos via RT
wrote:
> > > The commit message is
> > > 
> > > Author: Father Chrysostomos <sprout@cpan.org>
> > > Date:   Mon Jul 11 13:10:03 2011 -0700
> > > 
> > >     Fix a Storable test to work in 5.8.9-
> > > 
> > >     This test only passes in 5.10.0+ because of a nasty bug in
> > > Hash::Util,
> > >     or perhaps Internals::SvREADONLY.
> > > 
> > >     lock_hash is supposed to lock values as well as keys, but it
> > > doesn’t
> > >     always in 5.10.0+, leading me to believe that it was the right
> > > func-
> > >     tion to use.  (Fixing that is for another commit.)
> > > 
> > > I believe that "5.8.9-" is intended to mean >= 5.8.9, in this context.
> > 
> > This was only requested as a prerequisite of another patch.
> > 
> > If we backport these two:
> > 
> >     fa819c1 Make SvIsCOW honest about globs
> >     3e89ba1 Make Internals::SvREADONLY smarter (depends on fa819c1)
> > 
> > then this one:
> > 
> >     a991bd3 Make Storable freeze COWs properly
> > 
> > will depend on d5c6c69, as the test it adds relies on the bug fixed by
> > the 3e89ba1.
> > 
> > d5c6c69 just fixes the test in a991bd3.
> 
> Thank you. I will retitle this ticket accordingly. If others think that
> 
>     fa819c1 Make SvIsCOW honest about globs
>     3e89ba1 Make Internals::SvREADONLY smarter (depends on fa819c1)
>     a991bd3 Make Storable freeze COWs properly
> 
> should be included in 5.14, I encourage you to vote for them on
> cherrymaint, or comment on this ticket with a rationale.

fa is just groundwork for 3e.  3e fixes this regression:

$ perl5.8.9 -lMHash::Util=unlock_value
$h{a} = __PACKAGE__; unlock_value %h, a; $h{a} =~ y/ia/ao/;
print __PACKAGE__
main
$ perl5.10.0 -lMHash::Util=unlock_value
$h{a} = __PACKAGE__; unlock_value %h, a; $h{a} =~ y/ia/ao/;
print __PACKAGE__
moan

a991bd3 stops frozen-and-thawed COW scalars from becoming read-only. 
It’s a regression from 5.8 in that COW scalars happen in sane code in
5.10.0, whereas they used to happen only in insane code.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=114848

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About