Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Can't time out a $sth-fetchrow()

by mje (Curate)
on May 27, 2011 at 07:54 UTC ( [id://906947]=note: print w/replies, xml ) Need Help??


in reply to Can't time out a $sth-fetchrow()

Your die string will not be $timeoutstr so you need to use =~ on line 29.

Also:

You might want to take a look at Signal Handling and Canceling Operations.

I use signals with DBD::Oracle but I use Sys::SigAction.

An alternative (although I'm not sure it is available for DBD::Oracle) is asynchronous operations which some DBDs support.

Replies are listed 'Best First'.
Re^2: Can't time out a $sth-fetchrow()
by Skeeve (Parson) on May 27, 2011 at 08:24 UTC

    Why do you think, my die string will not be $timeoutstr? I'm just curious because now, where I use what you also suggested, Sys::SigAction, it works. The "eq" also works.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

      Because it contains something like "timeout at x.pl line 16." because Perl added the line number.

        Understood. Thanks! That's why my $timeoutstr contains a trailing "\n". So no "at line..." is added


        s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
        +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://906947]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-03-19 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found