in reply to lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it
I think you're fine as far as passing the ref, but there are a couple of other style points that may bite you later.
The reason is that one day you'll forget the parentheses and be surprised at the fact that Perl did not set up @_ separately. (For more details, take a look at perlman:perlsub.)my $pdb = openDatabase(); # ... doSomething(DB => $pdb, FOO => 'bar');
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it
by tilly (Archbishop) on Aug 31, 2001 at 01:00 UTC |