projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85b81d9
)
[ID 20001215.004] Sys::Syslog::xlate doesn't handle LOG_EMERG
author
Mark J. Reed
<mreed@strange.turner.com>
Fri, 15 Dec 2000 21:22:29 +0000
(16:22 -0500)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Tue, 19 Dec 2000 17:10:57 +0000
(17:10 +0000)
Message-Id: <
200012160222
.VAA13986@strange.turner.com>
p4raw-id: //depot/perl@8193
ext/Sys/Syslog/Syslog.pm
patch
|
blob
|
history
diff --git
a/ext/Sys/Syslog/Syslog.pm
b/ext/Sys/Syslog/Syslog.pm
index
92b82a1
..
71f5b82
100644
(file)
--- a/
ext/Sys/Syslog/Syslog.pm
+++ b/
ext/Sys/Syslog/Syslog.pm
@@
-264,7
+264,9
@@
sub xlate {
$name = uc $name;
$name = "LOG_$name" unless $name =~ /^LOG_/;
$name = "Sys::Syslog::$name";
- eval { &$name } || -1;
+ # Can't have just eval { &$name } || -1 because some LOG_XXX may be zero.
+ my $value = eval { &$name };
+ defined $value ? $value : -1;
}
sub connect {