If you pass in $dbh, it's easier to write unit tests against your functions. You can use a Mock DBI or a testing database. With a lexical $dbh, there's a coupling that can be hard to test around. A package global would be easier in that case, but I don't mind passing the variable.
In reply to Re: Is this Bad form? (DBI)
by chromatic
in thread Is this Bad form? (DBI)
by Grygonos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |