Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Readonly hash keys stay readonly after copying #11940
Created by @dmcbride
I'm using Readonly::XS, but I don't think this has anything to do
my @readonlies = qw( blah baz );
my %tries = (
for my $blah (keys %tries)
I've marked three lines, "RO", "C", and "O".
In perl 5.8.8, the above works fine (with Readonly::XS installed).
In perl 5.10.1 (I don't have 5.10.0 to try with) and later, if I quote
If I run the above as-is in 5.10.1, I get Readonly detecting that
If I comment out line "RO" but uncomment line "C", I get the failures
If I put $blah and $baz in quotes on line "O", the "RO" line will kick
I can't explain this behaviour, but it does seem to be wrong.
If this is really a problem in R::XS, let me know and I'll open that
On Mon Feb 06 15:40:39 2012, email@example.com wrote:
I'm inclined to attribute the problem to Readonly::XS.
I tested your code on both Linux and Darwin, Perl 5.14.2 in both cases.
Then I installed Readonly::XS on both boxes. I then started to get all
Thank you very much.
On Tue, Feb 7, 2012 at 12:40 AM, firstname.lastname@example.org
It does. Readonly::is_sv_readonly is redefined when Readonly::XS is
You shouldn't be using is_sv_readonly in the first place. Checking
He's known to ignore bug reports (see the queues for Reaonly and
On Sat Feb 11 10:22:53 2012, LeonT wrote:
It may not be useful, but since neither Readonly nor Readonly::XS is
On Sat Feb 11 08:54:21 2012, jkeenan wrote:
There are two problems. Readonly::is_sv_readonly is not a documented
Secondly, Readonly::XS itself is using undocumented Perl interfaces.
On Sunday February 12 2012 2:27:01 PM you wrote:
Yes, I was only using that interface because I looked inside the Readonly
So, I suppose the logical question is: how do we definitively indicate that a
The only difference between Readonly::XS and Internals::SvREADONLY that I can
On Sun Feb 12 22:47:35 2012, email@example.com wrote:
Internals::SvREADONLY has been fixed in bleadperl, and I believe most of
If you really need to know whether a variable is read-only in older
On Mon Feb 13 16:14:35 2012, sprout wrote:
The read-only flag is 0x08000000, which only applies if SVf_FAKE