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

Re: fix for Sys::Syslog

Thread Previous | Thread Next
Yitzchak Scott-Thoennes
December 3, 2004 00:34
Re: fix for Sys::Syslog
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About