Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: die through several evals

by BrowserUk (Pope)
on Apr 23, 2013 at 18:02 UTC ( #1030206=note: print w/ replies, xml ) Need Help??


in reply to die through several evals

Why do you need nested evals?


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.


Comment on Re: die through several evals
Replies are listed 'Best First'.
Re^2: die through several evals
by Anonymous Monk on Apr 23, 2013 at 18:32 UTC

    Yo dawg, I heard you like evals.

Re^2: die through several evals
by nyaapa (Novice) on Apr 24, 2013 at 09:02 UTC
    i have sub $s and i execute something like
    eval { $s->(); };
    on alarm i die and if there any non-propagating evals in $s i'll stuck =(
      ... i'll stuck

      Stuck where? Doing what?

      I don't see anything getting "stuck"?:

      sub mys{ print "??$_[0]??"; eval{ die 'bad stuff' if $_[0] eq 'die' }; };; print 'here'; eval{ mys( 'hello' ) }; print 'there'; eval{ mys( 'die' ) }; print 'over here';; here ??hello?? there ??die?? over here

      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.
        $SIG{ALRM} = sub { die "TIMEDOUT" }; my $sub = sub { warn "visible"; eval { # some big action in eval sleep(); }; warn "invisible"; }; # execute $sub with timeout alarm(1); $sub->();
        and get
        visible at -e line 1. invisible at -e line 1.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (17)
As of 2015-07-29 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls