![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re^2: DBI::SQLite and apacheby afoken (Chancellor) |
on Jun 12, 2009 at 20:18 UTC ( #771080=note: print w/replies, xml ) | Need Help?? |
Even better: Let DBI do that for you: connect with RaiseError => 1 and every failing DBI method will die automatically. If you expect that a function may die, wrap in in an eval { BLOCK }. This is the usual way to handle transactions: Code that may fail and the final commit are wrapped in eval, followed by a rollback when $@ is true. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|