OxPM: Handling errors from DBI

Kate L Pugh kake at earth.li
Fri Oct 17 12:46:44 CDT 2003


On Fri 17 Oct 2003, James Davis <jamesd at jml.net> wrote:
> I've written a perl script that uses DBI to insert data into a MySQL
> table. However, the script will evoke all sorts of nastyness should
> MySQL be unavailble, or become unavailable during the execution of
> the script. I don't want to loose my data! :-)

If you expect the unavailability to be transient, you could look into
Mark's 'Attempt' module:
  http://search.cpan.org/~markf/Attempt/

It will try to do things over again if they fail the first time.

Kake



More information about the Oxford-pm mailing list