i need function like with_timeout(&;$), it executes first argument with timeout. I can't use fork and storable/json, because of db handlers or something.
also, i cant control passed sub for eval propagate.
Re^6: die through several evals
Replies are listed 'Best First'.
You want to write a subroutine, that takes an arbitrary code reference or block -- possible supplied by a third party -- and a number of seconds, as arguments. And you want to run that code; and time it out if it runs to long.
And the issue you are trying to address is that the code might throw an error (die) within an eval block within the coderef you are given, and not re-throw the error?
Does that sum up the problem?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.