I'd would tend to write the subroutines so I would always pass $dbh if I was writing in a functional/procedural style.
In an OO style I would just pass the $dbh once when I initialise the object.
In either case my motivation would be to decouple the $dbh from the code to make things like testing, changing handles, etc. a lot easier.
In reply to Re: Is this Bad form? (DBI)
by adrianh
in thread Is this Bad form? (DBI)
by Grygonos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |