diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-12-14 10:35:57 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-12-14 10:35:57 +0000 |
commit | 3b355090fae9787919aeb14708ef3dbcf0e7e8eb (patch) | |
tree | 3a912d1a6b961182db4b4a2ae5f0f7e198067f54 /ext/Sys | |
parent | 50b5b186141ccaf04acbfb9dc2601e0d07b6fb4a (diff) | |
download | perl-3b355090fae9787919aeb14708ef3dbcf0e7e8eb.tar.gz |
Allow escaping %m as %%m in Sys::Syslog format strings
(suggested by Joshua Richardson <jric@yahoo-inc.com>
and Yitzchak Scott-Thoennes)
p4raw-id: //depot/perl@23649
Diffstat (limited to 'ext/Sys')
-rw-r--r-- | ext/Sys/Syslog/Syslog.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index 551a885eb8..fb1232b33b 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/(?<!%)%m/$!/g; $mask .= "\n" unless $mask =~ /\n$/; $message = sprintf ($mask, @_); |