Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatch CPAN distribution.

Report information
The Basics
Id: 97733
Status: resolved
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.41
Fixed in: 2.43



Subject: attempt to flush email during DESTROY
Dear maintainer, Log::Log4perl may use Log::Dispatch::Email as dispatcher. Probably something is wrong there, which causes some message not get sent. This situation is handled by ::Email. Maybe you can improve this: Can't locate object method "open" via package "Mail::Mailer::sendmail" at xxx/perl-5.16.3 /lib/site_perl/5.16.3/Mail/Send.pm line 58 during global destruction. This is caused because DESTROY calls flush(), which calls $self->send_email when there is something in the buffer. And send_email() uses an other object which is already cleaned-up. May I suggest an improvement? use Devel::GlobalDestruction qw/in_global_destruction/; sub DESTROY { my $self = shift; if(in_global_destruction) { die "message not sent, while program terminates" if @{$self->{buffer} || []}; } else { $self->flush; } }