in reply to Re^3: instantiating an smtp object
in thread instantiating an smtp object
It's unfortunate that the eval ...; if ($@) ... idiom is still very prevalent, there are many examples in the literature and even the eval docs use it! However, the issues I linked to previously have been around for a long time and even though Perl 5.14 fixed some of the major issues, as far as I have read the fixes are not perfect yet. The idiom eval { ...; 1 } or ... at least allows for reliable detection of when eval failed, even when $@ gets clobbered.
As for $! vs. $@, I had a look at the source of Net::SMTP's new and it seems that $@ is explicitly set there.
Regards,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: instantiating an smtp object
by $h4X4_|=73}{ (Monk) on Jun 06, 2016 at 14:27 UTC | |
by haukex (Archbishop) on Jun 06, 2016 at 15:03 UTC | |
by $h4X4_|=73}{ (Monk) on Jun 07, 2016 at 08:22 UTC |