Extracting information back out of a DBH
peter at dragonstaff.com
Tue Feb 10 10:31:37 GMT 2009
Quoting Dave Hodgkinson <davehodg at gmail.com>:
>>> my $dbh = DBI->connect('dbi:mysql:dbname', 'user', 'pass');
>>> print Dumper( tied(%$dbh) );
>> Ahah, the tied was just the ticket.
> Perl question: what does tied do and why is it used in this situation?
I suspect it was used to provide data encapsulation and hiding in the
days before Perl objects and closures became well known.
More information about the london.pm