in reply to Re: Re: Perl dbi disconnect question...
in thread Perl dbi disconnect question...
That's right, bail_out will called for you. As for disconnect ... i don't explicitly call it unless i absolutely have to. As noted other replies to this question, you really don't have to. You definetly do not want to call bail_out itside of itself. As always, refer to the manual when in doubt: (just search for HandleError)
Should do the trick for now ... oh, don't worry about passing the message argument when you call bail_out, because you don't even have to call bail_out (but you still can if you need to). Also ... do you really need handle the errors? Have you tried letting DBI do it for you? Just specify RaiseError without any HandleError subroutine ...use Carp; ... sub bail_out { my $message = shift; confess ($message); }
And you are always welcome. :)
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|