[Pdx-pm] Perl Hacks and Productivity Tips
Andrew Savige
ajsavige at yahoo.com.au
Wed Oct 12 16:01:29 PDT 2005
--- chromatic wrote:
> If you use locked hashes (see Scalar::Util), you gain that back.
Are you referring to the lock_keys(), lock_value(), lock_hash() functions
in Hash::Util?
These look very nice to me. However, Damian's PBP Chapter 15 offers the
guideline: "Don't use restricted hashes". In support of this he states:
"like the now-deprecated pseudohashes, restricted hashes still offer
only voluntary security. The Hash::Util module also provides
unlock_keys(), unlock_value() and unlock_hash() subroutines, with
which all that pesky consistency checking and annoying attribute
encapsulation can be instantly circumvented."
This guideline was offered in the context of providing full encapsulation
for objects.
/-\
____________________________________________________
Do you Yahoo!?
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database.
http://au.movies.yahoo.com
More information about the Pdx-pm-list
mailing list