There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Zaxo,
One problem with Perl5's references is that there is no auto-dereferencing. Otherwise, you wouldn't have to resort to tying a variable It just gets to be a pain to use $dbh->() every where. You could also use my Multi-Method closures technique, but you need to remember to put {} around the method names. There's also the issue of keeping the hash keys synced with DBI's methods. You could tie the underlying hash so that it looked up each method on first invoke and kept it around for later. Then we are back to square one - tying tied variables. I guess what I am saying is that I think this is a nice use of Tie::Constrained, but that there is no such thing as a free lunch. Cheers - L~R In reply to Re: Lazy DBI Connection Handles
by Limbic~Region
|
|