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

Owner: Nobody in particular
Requestors: MARKOV [...]

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

Subject: attempt to flush email during DESTROY
Download (untitled) / with headers
text/plain 873b
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/ 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; } }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to