tied - hash question at perlmonks.org
Michael Stillwell
mjs at beebo.org
Wed Oct 1 21:52:00 CDT 2003
Scott Penrose wrote:
> * Aesthetics demands it
I reckon this in itself is a pretty good reason for tied hashes. If
whatever object you're manipulating behaves pretty much like a hash, why
not make it look like one too? A row from a database works pretty well
as a tied hash that updates the database when its "STORE" method is hit,
for example.
I don't see that there are any OO implications if only hash-like things
are tied. Even then it's pretty easy to get the underlying object back:
my $obj = tied (%$hash)->{HASH};
--M.
--
http://beebo.org
More information about the Melbourne-pm
mailing list