Revision history for Sys-Syslog
0.22 -- 2007.11.xx -- Sebastien Aperghis-Tramoni (SAPER)
+ [BUGFIX] CPAN-RT#29875: Added workaround SpamAssassin overzealous
+ logging features.
[FEATURE] Added support for PERROR option.
[FEATURE] Support for SYSLOG on z/OS, thanks to Chun Bing Ge.
[CODE] Prevent $@ from being visible outside the module, in trying
@connectMethods = grep { $_ ne 'udp' } @connectMethods;
}
-# use EventLog on Win32
-my $is_Win32 = $^O =~ /Win32/i;
+EVENTLOG: {
+ # use EventLog on Win32
+ my $is_Win32 = $^O =~ /Win32/i;
-if (eval "use Sys::Syslog::Win32; 1") {
- unshift @connectMethods, 'eventlog';
-} elsif ($is_Win32) {
- warn $@;
-}
+ # some applications are trying to be too smart
+ # yes I'm speaking of YOU, SpamAssassin, grr..
+ local($SIG{__DIE__}, $SIG{__WARN__}, $@);
-$@ = "";
+ if (eval "use Sys::Syslog::Win32; 1") {
+ unshift @connectMethods, 'eventlog';
+ }
+ elsif ($is_Win32) {
+ warn $@;
+ }
+}
my @defaultMethods = @connectMethods;
my @fallbackMethods = ();