develooper Front page | perl.perl5.porters | Postings from December 2004

Re: fix for Sys::Syslog

Thread Previous | Thread Next
From:
Yitzchak Scott-Thoennes
Date:
December 3, 2004 00:34
Subject:
Re: fix for Sys::Syslog
Message ID:
20041203083439.GA2860@efn.org
On Thu, Dec 02, 2004 at 06:27:17PM -0800, Joshua Richardson wrote:
> I hope I'm sending this mail to the right person.  I'm using your 
> Sys::Syslog module for PERL, and noticed a possible small bug.
> 
> When Sys::Syslog constructs the msg to send to syslog, it does
> 
> 	$mask =~ s/%m/$!/g;
> 
> Sometimes we want to send messages that have %m in them, so we escape it 
> and create a message like "executing cmd with %%m".  So wondering if you 
> would/should change the line to:
> 
> 	$mask =~ s/(?:^|[^%])%m/$!/g;

Not quite right; perhaps (?<!%)%m

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About