summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJim Schneider <jschneid@netilla.com>2004-03-05 09:03:10 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-03-06 21:09:10 +0000
commitb9f13614400d2300b9be70f1589bc5e1a203e67b (patch)
tree7bb0759e8f1689ddb1231a9579b3920285a9695a /ext
parent6765206cfafdb7dbdf4791696e6befaa040a8193 (diff)
downloadperl-b9f13614400d2300b9be70f1589bc5e1a203e67b.tar.gz
Allow syslog() to use numeric constants in addition to strings for
facility names and priorities. Subject: Patch for Sys::Syslog Message-Id: <200403051403.10674.jschneid@netilla.com> p4raw-id: //depot/perl@22451
Diffstat (limited to 'ext')
-rw-r--r--ext/Sys/Syslog/Syslog.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index 13598e7de0..244157f755 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -7,7 +7,7 @@ use Carp;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(openlog closelog setlogmask syslog);
@EXPORT_OK = qw(setlogsock);
-$VERSION = '0.04';
+$VERSION = '0.05';
# it would be nice to try stream/unix first, since that will be
# most efficient. However streams are dodgy - see _syslog_send_stream
@@ -394,6 +394,7 @@ sub _syslog_send_socket {
sub xlate {
local($name) = @_;
+ return $name+0 if $name =~ /^\s*\d+\s*$/;
$name = uc $name;
$name = "LOG_$name" unless $name =~ /^LOG_/;
$name = "Sys::Syslog::$name";