I believe you have misunderstood the advice: you combine the approaches, you don't replace one with the other.
You have to set $@ yourself by calling die in the normal way:
eval { $db->do($sql) or die $db->errstr(); $db->commit(); } if ($@) { warn "DB error: $@\n"; }
In reply to Re: Re: Re: DBI error and $@
by Anonymous Monk
in thread DBI error and $@
by notsoevil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |