develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #47948] [documentation] Hash::Util::FieldHash

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 11, 2013 00:52
Subject:
[perl #47948] [documentation] Hash::Util::FieldHash
Message ID:
rt-3.6.HEAD-2552-1373503913-279.47948-15-0@perl.org
On Wed Jul 10 13:15:12 2013, demerphq wrote:
> But I believe that the documentation in question is about field
> hashes, and not normal perl hashes, so it seems to me the question is
> irrelevant to answering this ticket. They seem like some kind of tie,
> and are definitely magic, so it seems to me they can do whatever they
> like.

Field hashes are actually quite different from tied hashes.  They are
regular perl hashes with extra magic attached to the elements to do some
extra bookkeeping behind the scenes.  But that magic does not intercept
the regular store/fetch operations of plain hashes.

In fact, the field hash magic is orthogonal to ties, so you can actually
tie a field hash.  namespace::clean uses that.

-- 

Father Chrysostomos


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

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