egunnar has asked for the wisdom of the Perl Monks concerning the following question:
eval{ local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required alarm($timeout); $conn = DBI->connect($connection, $USER, $PASS, { RaiseError => 0, AutoCommit => 1 } ); alarm(0); }; if ($@){ my_die ( "Unable to login : [$@]: [$conn->errstr]"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: alarm function not working here
by ikegami (Patriarch) on Aug 07, 2006 at 20:43 UTC |