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.