DBIx::Retry is an extended version from DBIx::Connector. It adds the ability to keep retrying to connect to a database for a specified amount of time in order to execute DBIx::Connector's run method.
SYNOPSIS
use DBIx::Retry;
my $conn = DBIx::Retry->new($dsn, $user, $tools, {retry_time => 5});
# all other method are inherited from DBIx::Connector
my $dbh = $conn->dbh; #get a database handle
# Do something with the handle - will retry for specified amount of time, should the database connection be lost
$conn->run(fixup => sub {
$_->do('INSERT INTO foo (name) VALUES (?)', undef, 'Fred' );
});
Product's homepage
Requirements:
· Perl