in reply to Re: Exiting eval via next: is that so bad?
in thread Exiting eval via next: is that so bad?
but I'm reluctant to use this in production as it just seems, well...icky somehow.
I would be very reluctant too. I'm confused by the example though - why not move the next TIME if !($time_to_wait % 2); outside of the eval? I guess this code might just be representative of some larger piece of code - in that case, isn't it possible to restrict the scope of the eval to just where it is needed, around the code that you don't want to be fatal, e.g. eval { this_will_die_if_true($time_to_wait); 1 } or do { ... };?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Exiting eval via next: is that so bad?
by SimonSaysCake (Beadle) on Jul 01, 2019 at 14:50 UTC | |
by haukex (Archbishop) on Jul 01, 2019 at 15:16 UTC |