in reply to eval: Why use the 'Zombie error' idiom?
Try::Tiny claims that up to 5.14, $@ was cleared at the beginning of the eval { block.
I think that also a destructor containing eval { can clear out $@, so the above idiom is necessary.
Using (for example) Try::Tiny helps avoiding that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: eval: Why use the 'Zombie error' idiom?
by DouglasDD (Beadle) on Oct 18, 2019 at 09:57 UTC | |
by hippo (Archbishop) on Oct 18, 2019 at 10:45 UTC | |
by Corion (Patriarch) on Oct 18, 2019 at 10:04 UTC | |
|
Re^2: eval: Why use the 'Zombie error' idiom?
by DouglasDD (Beadle) on Oct 18, 2019 at 10:03 UTC | |
by hippo (Archbishop) on Oct 18, 2019 at 10:43 UTC | |
by kikuchiyo (Hermit) on Oct 18, 2019 at 11:34 UTC | |
by hippo (Archbishop) on Oct 18, 2019 at 13:15 UTC | |
by jcb (Parson) on Oct 18, 2019 at 23:13 UTC |