develooper Front page | perl.perl5.porters | Postings from November 2003

Re: 5.8.2 coredump: tied hashes implemented as XSUB methods

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
November 19, 2003 03:54
Subject:
Re: 5.8.2 coredump: tied hashes implemented as XSUB methods
Message ID:
20031119114448.2752.13@llama.elixent.com
Alan Burlison <Alan.Burlison@sun.com> writes:
>> I think it had an effect if you applied it to the hash elements, but I 
>> don't think it ever did anything to the hash itself.
>
>Actually, that's wrong, setting a hash to readonly did affect its behaviour 
>even on 5.6.1, as the following test from the module test script checks:
>
># Check readonly-ness of hash structure.
>eval { $ks->{cpu_info}{$cpu}{$cpu_info} = {}; };
>print($@ =~ /^Modification of a read-only/i ? "ok $test\n" : "not ok $test\n");
>
>So the reuse of the readonly bit to implement restricted hashes has indeed 
>broken existing working code.  I'm now faced with having to have 2 versions 
>of the module :-(

I _think_ that message is due to READONLY-ness of the _value_ 

>
>-- 
>Alan Burlison


Thread Previous | Thread Next


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