in reply to Is this Bad form? (DBI)
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.
|
|---|