develooper Front page | perl.perl5.porters | Postings from May 2016

[perl #128231] Perl confuses a tied hash and its element, sogenerating a wrong error message

Thread Next
From:
Father Chrysostomos via RT
Date:
May 24, 2016 23:54
Subject:
[perl #128231] Perl confuses a tied hash and its element, sogenerating a wrong error message
Message ID:
rt-4.0.18-8893-1464134061-1319.128231-15-0@perl.org
On Tue May 24 09:44:48 2016, porton@narod.ru wrote:
> Sorry, it is my error, not Perl bug.
> 
> $obj->{X}->{Y} modifies $obj->{X} transforming it from undef to a
> hash. So STORE is called.

This may not be relevant to your use case, but I have, in the past, found Tie::Hash::ReadonlyStack (on CPAN) helpful in avoiding accidental STORE calls on tied hashes.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: rejected
https://rt.perl.org/Ticket/Display.html?id=128231

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