![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Possible scoping issue with Log::Log4perl logger ( END { undef $log; } )by beech (Parson) |
on Jun 16, 2018 at 22:31 UTC ( [id://1216795]=note: print w/replies, xml ) | Need Help?? |
Hi I see things working as designed so far, as in the appender gets called
But if I actually try sending the mail (rename my sub send_mail)
Without buffering its Died at site/lib/Mail/Mailer.pm line 158. for every attempt. An explicit undef $logger ; produces the same good result Adding use Mail::Mailer::smtp(); produces the same failure to send the mail to example :) No such file or directory at site/lib/Mail/Mailer.pm line 158 during global destruction. as without buffering No such file or directory at site/lib/Mail/Mailer.pm line 158. Trying to require Mail::Mailer::smtp; from within send_email fails as before Can't locate object method "open" via package "Mail::Mailer::smtp" So, Mail::Mailer::smtp can't be loaded during global destruction. Does Email::... eventually use it? Not important :) So, if using a global for convenience, solution is
In Section
Seekers of Perl Wisdom
|
|