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:
c5f4553
)
Use Sys::Hostname only when necessary
author
Perl 5 Porters
<perl5-porters@africa.nicoh.com>
Sun, 17 Mar 1996 11:21:09 +0000
(11:21 +0000)
committer
Charles Bailey
<bailey@genetics.upenn.edu>
Sun, 17 Mar 1996 11:21:09 +0000
(11:21 +0000)
lib/Sys/Syslog.pm
patch
|
blob
|
history
diff --git
a/lib/Sys/Syslog.pm
b/lib/Sys/Syslog.pm
index
32d2e4a
..
f02a2b5
100644
(file)
--- a/
lib/Sys/Syslog.pm
+++ b/
lib/Sys/Syslog.pm
@@
-7,7
+7,6
@@
use Carp;
@EXPORT = qw(openlog closelog setlogmask syslog);
use Socket;
-use Sys::Hostname;
# adapted from syslog.pl
#
@@
-200,6
+199,10
@@
sub xlate {
}
sub connect {
+ unless ($host) {
+ require Sys::Hostname;
+ $host = Sys::Hostname::hostname();
+ }
my $udp = getprotobyname('udp');
my $syslog = getservbyname('syslog','udp');
my $this = sockaddr_in($syslog, INADDR_ANY);