Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

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



Subject: log strings not consistent
Hi. In your beautiful code, I found some inconsistencies in how the log method is called: sometimes you specify a line with trailing \n, sometimes not. If I count correctly, 19 times with a trailing \n and 31 times without. "Without" is probably the right choice. By the way, in your log() method, you do my $ok = eval { if (@therest) { # if more parameters are passed, we must assume that the first is a format string Sys::Syslog::syslog($level, $msg, @therest); } else { Sys::Syslog::syslog($level, '%s', $msg); } 1; }; but if Sys::Syslog is (enforced to be) recent enough (and that can be defended very well, because there where quite some bug is older versions), you could simply say syslog($msg, @therest) I think 0.19 is sufficient.
I have gone through and updated all of the log strings to not have the trailing newline as you suggested. I am currently keeping the syslog code the same, as functionality is OK - but that way we can keep backwards compatibility for people who can't move off of their old perls.