Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Exiting eval via next: is that so bad?

by dd-b (Monk)
on Sep 23, 2011 at 19:36 UTC ( #927610=note: print w/ replies, xml ) Need Help??


in reply to Re: Exiting eval via next: is that so bad?
in thread Exiting eval via next: is that so bad?

Please forgive necromancy.

In the case I just hit, I'm doing this:

CLIENT: while (!exitflag) { eval { # Various things that might throw exceptions if (blah blah) { next CLIENT; } }; if ($@) { # Exception handling } }

So, I'm not just exiting the eval, I'm exiting considerably more. AND I'm doing it by an explicit label, not implicitly, so I really shouldn't be confused about what I'm doing. I'd really prefer not to get this warning in the case when I'm using a loop label to exit a particular loop.

(The big while loop is handling client connects as they come in, the eval inside it is to prevent unexpected errors from killing the whole server; they just abort the one connection. This is test code, the full version will fork of course, once it can handle the simple case.)


Comment on Re^2: Exiting eval via next: is that so bad?
Download Code
Re^3: Exiting eval via next: is that so bad?
by Anonymous Monk on Sep 24, 2011 at 02:01 UTC

      In my mind, this wasn't a new question, it was a continuation of a discussion I'd found. Isn't the idea of searching first to avoid starting new questions when reasonably possible?

      Anyway, thanks for your suggestion of the "no warnings" pragma.

        Isn't the idea of searching first to avoid starting new questions when reasonably possible?

        No, the idea is to find answers to your own questions :)

        If the old thread doesn't answer your question, you create a new one, and say:

        I got this question ... saw this old related thread ( [id://104789] ), but it doesn't answer my question exactly

         

        In my mind, this wasn't a new question, it was a continuation of a discussion I'd found.

        This is common , but consider the dates.

        Hofmator, whom you asked a question, hasn't visited perlmonks in 5 years.

        The discussion you continued is 10+ years old.

        Sure any one of the perlmonks could notice your node and reply, but only Hofmator is guaranteed to notice, if he returns and has /msg me when a reply arrives turned on:) and as you've noticed, it isn't the same as asking all the perlmonks for help, all you got was me :)

        necromancy tends to fly under the radar , I try to hunt for these things :)

        Pay no attention to the troll behind the mask.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-08-02 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls