> First off, I had no idea it existed until I started going through a dbi
> tutorial. The idea is you don't have to litter your code with "or
> die..." statements.

> Is it good practice to use this or is an explicit "or die..." better
> because you can "see" there is error trapping?

I think setting the RaiseError and PrintError attributes on your database
handle is the best way to do these things.

$dbh = DBI->connect($DSN, $user, $pass, { RaiseError => 1, PrintError
=> 0, AutoCommit =>0});

Hope this helps,
Stuart.

Reply via email to