'Sys::Syslog' => {
'MAINTAINER' => 'saper',
- 'DISTRIBUTION' => 'SAPER/Sys-Syslog-0.31.tar.gz',
+ 'DISTRIBUTION' => 'SAPER/Sys-Syslog-0.32.tar.gz',
'FILES' => q[cpan/Sys-Syslog],
'EXCLUDED' => [
qr{^eg/},
Revision history for Sys-Syslog
+0.32 -- 2012.09.14 -- Sebastien Aperghis-Tramoni (SAPER)
+ [BUGFIX] CPAN-RT#69040: Don't modify @_ in syslog().
+ [BUGFIX] Restore compatibility with Perl 5.6.0.
+ [DOC] Perl-RT#81858: Fix some spelling errors (Peter J. Acklam).
+
0.31 -- 2012.08.18 -- Sebastien Aperghis-Tramoni (SAPER)
[BUGFIX] Level 'emerg' could not be used since v0.29.
[BUGFIX] Setting a message facility with syslog() was broken since v0.29
[FEATURE] Each non-standard macro now fall backs to a standard macro.
[CODE] Merged changes from Jerry D. Hedden to use ppport.h only when not
built from core distribution (blead@30657).
- [TESTS] t/syslog.t now generates a more detailled TAP output.
+ [TESTS] t/syslog.t now generates a more detailed TAP output.
[TESTS] Merged change blead@29176: suppress taint mode from t/constants.t
[TESTS] Added regression tests for CPAN-RT#21866 and #25488.
[EG] Added example script eg/syslog.pl
0.15 -- 2006.06.10 -- Sebastien Aperghis-Tramoni (SAPER)
[FEATURE] CPAN-RT#17316: Added a "nofatal" option to openlog().
- [FEATURE] Sys::Syslog warnings can now be controled by the warnings
+ [FEATURE] Sys::Syslog warnings can now be controlled by the warnings
category of the same name.
[FEATURE] Added support for using the native C syslog(3) functions.
[CODE] Removed most "our" variables.
(Ronald J. Kimball).
[CODE] Now setlogsock() really croak(), as documented.
[DIST] CPANized from blead@26281.
- [DIST] Modified Makefile.PL so that ExtUtils::Constant is conditionaly
+ [DIST] Modified Makefile.PL so that ExtUtils::Constant is conditionally
used, with a fallback in the case it's not available.
[DIST] Bumped version to 0.09
[DOC] Added support and license information.
by Sys::Syslog is PerlLog.mc, located in the win32/ subdirectory.
If the message file is updated then you need to go in the win32/
- subdirectory and run the "compile.pl" command to update the relevent
+ subdirectory and run the "compile.pl" command to update the relevant
files. Note that Sys::Syslog::Win32 is built by this process.
The following files are in the win32 directory:
{ no strict 'vars';
- $VERSION = '0.31';
+ $VERSION = '0.32';
@ISA = qw< Exporter >;
%EXPORT_TAGS = (
my $syslog_send; # coderef of the function used to send messages
my $syslog_path = undef; # syslog path for "stream" and "unix" mechanisms
my $syslog_xobj = undef; # if defined, holds the external object used to send messages
-my $transmit_ok = 0; # flag to indicate if the last message was transmited
+my $transmit_ok = 0; # flag to indicate if the last message was transmitted
my $sock_port = undef; # socket port
my $sock_timeout = 0; # socket timeout, see below
my $current_proto = undef; # current mechanism used to transmit messages
$sock_timeout = 0.001 if $^O =~ /darwin|gnukfreebsd/;
+
+# Perl 5.6.0's warnings.pm doesn't have warnings::warnif()
+if (not defined &warnings::warnif) {
+ *warnings::warnif = sub {
+ goto &warnings::warn if warnings::enabled(__PACKAGE__)
+ }
+}
+
# coderef for a nicer handling of errors
my $err_sub = $options{nofatal} ? \&warnings::warnif : \&croak;
$found = 1;
}
else {
- warnings::warnif "setlogsock(): type='$sock_type': "
- . $mechanism{$sock_type}{err_msg};
+ warnings::warnif("setlogsock(): type='$sock_type': "
+ . $mechanism{$sock_type}{err_msg});
}
}
}
sub syslog {
- my $priority = shift;
- my $mask = shift;
+ my ($priority, $mask, @args) = @_;
my ($message, $buf);
my (@words, $num, $numpri, $numfac, $sum);
my $failed = undef;
if ($mask =~ /%m/) {
# escape percent signs for sprintf()
- $error =~ s/%/%%/g if @_;
+ $error =~ s/%/%%/g if @args;
# replace %m with $error, if preceded by an even number of percent signs
$mask =~ s/(?<!%)((?:%%)*)%m/$1$error/g;
}
$mask .= "\n" unless $mask =~ /\n$/;
- $message = @_ ? sprintf($mask, @_) : $mask;
+ $message = @args ? sprintf($mask, @args) : $mask;
if ($current_proto eq 'native') {
$buf = $message;
=head1 VERSION
-This is the documentation of version 0.31
+This is the documentation of version 0.32
=head1 SYNOPSIS
is( $@, '', "setlogsock() called with '$sock_type'" );
TODO: {
local $TODO = "minor bug";
+ SKIP: { skip "TODO $TODO", 1 if $] < 5.006002;
ok( $r, "setlogsock() should return true: '$r'" );
+ }
}
# open syslog with a "local0" facility
$template =~ s/__TIME__/localtime()/ge;
print $out $template;
close $out;
-print "Updated Win32.pm and relevent message files\n";
+print "Updated Win32.pm and relevant message files\n";
__END__
package Sys::Syslog::Win32;