Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: do separate hashes share common keys?

by LanX (Saint)
on Feb 14, 2021 at 20:26 UTC ( [id://11128374]=note: print w/replies, xml ) Need Help??


in reply to Re^3: do separate hashes share common keys?
in thread do separate hashes share common keys?

From memory of old experiments:

I think "fields" means attributes not methods.

And it's supposed to "boom" if an attribute is missing or typoed, even at compile time.

So it's rather a hash with frozen keys (not "Yet Another OO Model").

But yes, the sparse documentation invites to misinterpretations.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^4: do separate hashes share common keys?

Replies are listed 'Best First'.
Re^5: do separate hashes share common keys?
by jcb (Parson) on Feb 14, 2021 at 22:20 UTC

    I believe that Radiola is correct that fields was intended as an interface to pseudo-hashes. I remember documentation urging the use of fields because it was specifically intended as a forwards-compatible interface that would still work after pseudo-hashes were removed.

    Pseudo-hashes seem to have been recognized as a bad idea almost as soon as they were implemented.

    You are also correct that fields has nothing to do with object methods; Radiola is confused on this point, although the documentation is also confusing here, since fields is documented in OO terms.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11128374]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found