From: Rafael Garcia-Suarez Date: Tue, 14 Dec 2004 10:35:57 +0000 (+0000) Subject: Allow escaping %m as %%m in Sys::Syslog format strings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b355090fae9787919aeb14708ef3dbcf0e7e8eb;p=p5sagit%2Fp5-mst-13.2.git Allow escaping %m as %%m in Sys::Syslog format strings (suggested by Joshua Richardson and Yitzchak Scott-Thoennes) p4raw-id: //depot/perl@23649 --- diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index 551a885..fb1232b 100644 --- a/ext/Sys/Syslog/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -1,5 +1,5 @@ package Sys::Syslog; -require 5.000; +require 5.006; require Exporter; require DynaLoader; use Carp; @@ -7,7 +7,7 @@ use Carp; @ISA = qw(Exporter DynaLoader); @EXPORT = qw(openlog closelog setlogmask syslog); @EXPORT_OK = qw(setlogsock); -$VERSION = '0.05'; +$VERSION = '0.06'; # it would be nice to try stream/unix first, since that will be # most efficient. However streams are dodgy - see _syslog_send_stream @@ -313,7 +313,7 @@ sub syslog { $whoami .= "[$$]" if $lo_pid; - $mask =~ s/%m/$!/g; + $mask =~ s/(?