in reply to Re: Where did $@ go?
in thread Where did $@ go?
Using Try::Tiny, I get the thrown object in the catch block.
Even data dumper shows, in my original call, $@ to be ''. But the code branch is executed, so it is true.
As for your example, the core docs say that if eval completes without error, then $@ is guaranteed to be a null string, so you can write eval{...}; warn if $@;. You should not need to ensure your block evaluates to true, by original design of the feature.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Where did $@ go?
by JavaFan (Canon) on Mar 21, 2011 at 10:43 UTC | |
by John M. Dlugosz (Monsignor) on Mar 21, 2011 at 12:06 UTC | |
by Corion (Patriarch) on Mar 21, 2011 at 12:11 UTC | |
by John M. Dlugosz (Monsignor) on Mar 21, 2011 at 12:18 UTC | |
by JavaFan (Canon) on Mar 21, 2011 at 13:31 UTC |