Subject: | Segfaulting in cleanup |
Date: | Wed, 11 Mar 2009 11:27:00 -0500 |
To: | bug-log-dispatch-email-emailsend [...] rt.cpan.org |
From: | Andy Lester <andy [...] petdance.com> |
helmet:~/twlab/andytoys/segfault : cat gr
#!/usr/bin/perl
use strict;
use warnings;
use Log::Dispatch;
use Log::Dispatch::Screen;
use Log::Dispatch::Email::EmailSend;
MAIN: {
# my $log;
our $log; # If this is "my $log", then we lose the segfault
$log = Log::Dispatch->new;
$log->add(
Log::Dispatch::Screen->new(
name => 'screen',
min_level => 'debug',
stderr => 1
)
);
$log->add(
Log::Dispatch::Email::EmailSend->new( {
name => 'email',
min_level => 'info',
subject => "Log: " . localtime(),
to => [ 'andy@petdance.com' ],
} )
);
my $now = localtime();
$log->info( "Started logging at $now\n" );
$now = localtime();
$log->info( "Ended logging at $now\n" );
}
helmet:~/twlab/andytoys/segfault : ./gr
Started logging at Wed Mar 11 11:26:39 2009
Ended logging at Wed Mar 11 11:26:39 2009
Segmentation fault
--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance