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:
Alan Burlison
Date:
November 17, 2003 16:55
Subject:
Re: 5.8.2 coredump: tied hashes implemented as XSUB methods
Message ID:
3FB96DC5.5000508@sun.com
> 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 :-(

-- 
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