Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 21265
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: carlos.velasco [...] nimastelecom.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [Patch] pid logopt was being stripped cause a bad RE in post_configure
Date: Fri, 01 Sep 2006 18:38:08 +0200
To: bug-Net-Server [...] rt.cpan.org
From: Carlos Velasco <carlos.velasco [...] nimastelecom.com>
Hello, When logging to syslog, logopt was not being parsed correctly. In the usual way of work, pid number was not being showed in syslog. Here's a patch for it. --- Net-Server-0.94/lib/Net/Server.pm 2006-07-12 04:48:53.000000000 +0200 +++ Net-Server-0.94_patched/lib/Net/Server.pm 2006-09-01 18:33:28.000000000 +0200 @@ -261,7 +261,7 @@ my $opt = defined($prop->{syslog_logopt}) ? $prop->{syslog_logopt} : $Sys::Syslog::VERSION ge '0.15' ? 'pid,nofatal' : 'pid'; - $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid)($|\|))*/) + $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid!nofatal)($|,))*/) ? $1 : 'pid'; my $fac = defined($prop->{syslog_facility}) Regards, Carlos Velasco
Subject: Re: [rt.cpan.org #21265] AutoReply: [Patch] pid logopt was being stripped cause a bad RE in post_configure
Date: Fri, 01 Sep 2006 19:17:50 +0200
To: bug-Net-Server [...] rt.cpan.org
From: Carlos Velasco <carlos.velasco [...] nimastelecom.com>
Sorry, this is the right patch: diff -ur Net-Server-0.94/lib/Net/Server.pm Net-Server-0.94_patched/lib/Net/Server.pm --- Net-Server-0.94/lib/Net/Server.pm 2006-07-12 04:48:53.000000000 +0200 +++ Net-Server-0.94_patched/lib/Net/Server.pm 2006-09-01 19:14:28.000000000 +0200 @@ -261,7 +261,7 @@ my $opt = defined($prop->{syslog_logopt}) ? $prop->{syslog_logopt} : $Sys::Syslog::VERSION ge '0.15' ? 'pid,nofatal' : 'pid'; - $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid)($|\|))*/) + $prop->{syslog_logopt} = ($opt =~ /^(((cons|ndelay|nowait|pid|nofatal),*)*$)/) ? $1 : 'pid'; my $fac = defined($prop->{syslog_facility})
The code now looks like: $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid| nofatal)($|[,|]))*/) It will be in 0.95 released in a day or two.