in reply to Re: Problem of scope : $SIG{__WARN__} in a module...
in thread Problem of scope : $SIG{__WARN__} in a module...
you can give the DBI handle an error handler:Errr... I don't really get it, how is this code supposed to work? won't it pass any warning to the sub, not only the dbh warnings ?
$h->{RaiseError} = 1; # Turn all warnings into dies
$h->{HandleError} = sub { set_dberror(join('',@_)) };
Any errors generated by the dbh will be passed to your sub.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem of scope : $SIG{__WARN__} in a module...
by TedYoung (Deacon) on Dec 03, 2004 at 19:25 UTC | |
by wazoox (Prior) on Dec 03, 2004 at 20:56 UTC |