t/lib/soundex.t See if Soundex works
t/lib/symbol.t See if Symbol works
t/lib/syslfs.t See if large files work for sysio
+t/lib/syslog.t See if Sys::Syslog works
t/lib/textfill.t See if Text::Wrap::fill works
t/lib/texttabs.t See if Text::Tabs works
t/lib/textwrap.t See if Text::Wrap::wrap works
socket(SYSLOG,AF_INET,SOCK_DGRAM,$udp) || croak "socket: $!";
connect(SYSLOG,$that) || croak "connect: $!";
} else {
- my $syslog = &_PATH_LOG || croak "_PATH_LOG not found in syslog.ph";
+ my $syslog = _PATH_LOG() || croak "_PATH_LOG not found in syslog.ph";
my $that = sockaddr_un($syslog) || croak "Can't locate $syslog";
socket(SYSLOG,AF_UNIX,SOCK_STREAM,0) || croak "socket: $!";
if (!connect(SYSLOG,$that)) {
--- /dev/null
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib';
+ require Config; import Config;
+ if ($Config{'extensions'} !~ /\bSyslog\b/) {
+ print "1..0 # Skip: Sys::Syslog was not built\n";
+ exit 0;
+ }
+}
+
+use Sys::Syslog qw(:DEFAULT setlogsock);
+
+print "1..6\n";
+
+print defined(eval { setlogsock('unix') }) ? "ok 1\n" : "not ok 1\n";
+print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 2\n" : "not ok 2\n";
+print defined(eval { syslog('info', 'test') }) ? "ok 3\n" : "not ok 3\n";
+
+print defined(eval { setlogsock('inet') }) ? "ok 4\n" : "not ok 4\n";
+print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 5\n" : "not ok 5\n";
+print defined(eval { syslog('info', 'test') }) ? "ok 6\n" : "not ok 6\n";