Extracting information back out of a DBH
david at cantrell.org.uk
Tue Feb 10 14:40:45 GMT 2009
On Tue, Feb 10, 2009 at 08:44:26AM +0000, Dave Hodgkinson wrote:
> Perl question: what does tied do and why is it used in this situation?
tied() is the opposite of tie(). It gives you access to the underlying
data structure/object that tie() has magicked into have the interface
of a traditional array/hash/whatever.
It is, incidentally, incorrect to say that it's a hangover from the bad
old days before OO perl was well-understood. tied() is useful for those
cases where, as well as providing the semantics of a normal hash/array,
you *also* want to give access to other less-commonly-used methods.
See Data::Transactional for what I think is a good example.
David Cantrell | Godless Liberal Elitist
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.
-- Robert A Heinlein
More information about the london.pm