in reply to DBI timeout

from the DBI manpage:
The two most common uses of signals in relation to the DBI
are for canceling operations when the user types Ctrl-C
(interrupt), and for implementing a timeout using alarm()
and $SIG{ALRM}.
and according to the perlfunc manpage on alarm you would do something along these lines:
eval { local $SIG{ALRM} = sub {die "alarm\n";}; alarm($timeout); $db->execute($query); alarm(0); }; if ($@) { die "Error" unless $@ eq "alarm\n"; #timed out } else { #didnt }