in reply to Re^2: Where did $@ go?
in thread Where did $@ go?
I'm not sure what I was hoping to find out, but I can tell you this: Email::Sender::Failure overloads stringification with fallback, which means the object gets stringified on testing it as a bool. $@ appears to be getting clobbered, which could happen in the stringification code.
I'm pretty sure that only referencing $@ once will do the trick:
if (my $e = $@) { ... use $e here ... }
And if not, this should definitely do the trick:
if (my $e = "$@") { ... use $e here ... }
That should get the value the if was seeing.
(You can move the assignment out of the "if" if you prefer.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Where did $@ go?
by John M. Dlugosz (Monsignor) on Mar 22, 2011 at 06:51 UTC | |
by JavaFan (Canon) on Mar 22, 2011 at 07:27 UTC | |
by ikegami (Patriarch) on Mar 22, 2011 at 07:02 UTC |