summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-09-15 12:45:06 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-09-15 12:45:06 +0100
commitaaa7a44487510d26bc5775de29d27f8f53c887c7 (patch)
treed5ac0275f728ea89b851613679f0f02ceda5666e /cpan
parent3667b52644f6de04e0794d70fd3b6643f66442d7 (diff)
downloadperl-aaa7a44487510d26bc5775de29d27f8f53c887c7.tar.gz
Update Sys-Syslog to CPAN version 0.32
[DELTA] 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).
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Sys-Syslog/Changes11
-rw-r--r--cpan/Sys-Syslog/README.win322
-rw-r--r--cpan/Sys-Syslog/Syslog.pm25
-rw-r--r--cpan/Sys-Syslog/t/syslog.t2
-rw-r--r--cpan/Sys-Syslog/win32/compile.pl2
5 files changed, 28 insertions, 14 deletions
diff --git a/cpan/Sys-Syslog/Changes b/cpan/Sys-Syslog/Changes
index c1a8795423..a30b4908bd 100644
--- a/cpan/Sys-Syslog/Changes
+++ b/cpan/Sys-Syslog/Changes
@@ -1,5 +1,10 @@
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
@@ -137,7 +142,7 @@ Revision history for Sys-Syslog
[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
@@ -170,7 +175,7 @@ Revision history for Sys-Syslog
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.
@@ -232,7 +237,7 @@ Revision history for Sys-Syslog
(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.
diff --git a/cpan/Sys-Syslog/README.win32 b/cpan/Sys-Syslog/README.win32
index adf253ab96..cecb8dc481 100644
--- a/cpan/Sys-Syslog/README.win32
+++ b/cpan/Sys-Syslog/README.win32
@@ -11,7 +11,7 @@ DESCRIPTION
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:
diff --git a/cpan/Sys-Syslog/Syslog.pm b/cpan/Sys-Syslog/Syslog.pm
index 3d0c00dae7..deae4f3d6a 100644
--- a/cpan/Sys-Syslog/Syslog.pm
+++ b/cpan/Sys-Syslog/Syslog.pm
@@ -12,7 +12,7 @@ require 5.005;
{ no strict 'vars';
- $VERSION = '0.31';
+ $VERSION = '0.32';
@ISA = qw< Exporter >;
%EXPORT_TAGS = (
@@ -91,7 +91,7 @@ my $connected = 0; # flag to indicate if we're connected or not
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
@@ -147,6 +147,14 @@ my @fallbackMethods = ();
$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;
@@ -329,8 +337,8 @@ sub setlogsock {
$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});
}
}
@@ -341,8 +349,7 @@ sub setlogsock {
}
sub syslog {
- my $priority = shift;
- my $mask = shift;
+ my ($priority, $mask, @args) = @_;
my ($message, $buf);
my (@words, $num, $numpri, $numfac, $sum);
my $failed = undef;
@@ -409,13 +416,13 @@ sub syslog {
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;
@@ -893,7 +900,7 @@ Sys::Syslog - Perl interface to the UNIX syslog(3) calls
=head1 VERSION
-This is the documentation of version 0.31
+This is the documentation of version 0.32
=head1 SYNOPSIS
diff --git a/cpan/Sys-Syslog/t/syslog.t b/cpan/Sys-Syslog/t/syslog.t
index d69c6e3e12..8774677cf7 100644
--- a/cpan/Sys-Syslog/t/syslog.t
+++ b/cpan/Sys-Syslog/t/syslog.t
@@ -96,7 +96,9 @@ SKIP: {
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
diff --git a/cpan/Sys-Syslog/win32/compile.pl b/cpan/Sys-Syslog/win32/compile.pl
index 8502309bc7..3c38691039 100644
--- a/cpan/Sys-Syslog/win32/compile.pl
+++ b/cpan/Sys-Syslog/win32/compile.pl
@@ -83,7 +83,7 @@ $template =~ s/__MAX__/'$max'/g;
$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;