Type "dmake test" (or "nmake test"). This will run most of the tests from
the testsuite (many tests will be skipped).
-No tests should typically fail when running Windows NT 4.0. Under Windows
-2000, test 22 in lib/open3.t is known to fail (cause still unknown). Many
-tests will fail under Windows 9x due to the inferior command shell.
+There should be no test failures when running under Windows NT 4.0 or
+Windows 2000. Many tests I<will> fail under Windows 9x due to the inferior
+command shell.
Some test failures may occur if you use a command shell other than the
native "cmd.exe", or if you are building from a path that contains
=item *
If you want to use multiple patterns, e.g. C<bsd_glob "a* b*">, you should
-probably throw them in a set as in C<glob "{a*,b*}">. This is because
-the argument to glob isn't subjected to parsing by the C shell. Remember
-that you can use a backslash to escape things.
+probably throw them in a set as in C<bsd_glob "{a*,b*}">. This is because
+the argument to bsd_glob() isn't subjected to parsing by the C shell.
+Remember that you can use a backslash to escape things.
=item *
C<openlog()> or C<syslog()> and returns TRUE on success,
undef on failure.
-A value of 'unix' will connect to the UNIX domain socket returned by
-C<_PATH_LOG> in F<syslog.ph>. A value of 'inet' will connect to an
-INET socket returned by getservbyname(). Any other value croaks.
+A value of 'unix' will connect to the UNIX domain socket returned by the
+C<_PATH_LOG> macro (if you system defines it) in F<syslog.h>. A value of
+'inet' will connect to an INET socket returned by getservbyname(). If
+C<_PATH_LOG> is unavailable or if getservbyname() fails, returns undef. Any
+other value croaks.
The default is for the INET socket to be used.
=head1 AUTHOR
-Tom Christiansen E<lt>F<tchrist@perl.com>E<gt> and Larry Wall E<lt>F<larry@wall.org>E<gt>.
-UNIX domain sockets added by Sean Robinson E<lt>F<robinson_s@sc.maricopa.edu>E<gt>
-with support from Tim Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing list.
-Dependency on F<syslog.ph> replaced with XS code bu Tom Hughes E<lt>F<tom@compton.nu>E<gt>.
+Tom Christiansen E<lt>F<tchrist@perl.com>E<gt> and Larry Wall
+E<lt>F<larry@wall.org>E<gt>.
+
+UNIX domain sockets added by Sean Robinson
+E<lt>F<robinson_s@sc.maricopa.edu>E<gt> with support from Tim Bunce
+E<lt>F<Tim.Bunce@ig.co.uk>E<gt> and the perl5-porters mailing list.
+
+Dependency on F<syslog.ph> replaced with XS code by Tom Hughes
+E<lt>F<tom@compton.nu>E<gt>.
=cut
local($setsock) = shift;
&disconnect if $connected;
if (lc($setsock) eq 'unix') {
- if (defined &_PATH_LOG) {
+ if (length _PATH_LOG()) {
$sock_type = 1;
} else {
return undef;
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();
+ length($syslog) || croak "_PATH_LOG unavailable in syslog.h";
my $that = sockaddr_un($syslog) || croak "Can't locate $syslog";
socket(SYSLOG,AF_UNIX,SOCK_STREAM,0) || croak "socket: $!";
if (!connect(SYSLOG,$that)) {
#ifdef _PATH_LOG
RETVAL = _PATH_LOG;
#else
- croak("Your vendor has not defined the Sys::Syslog macro _PATH_LOG");
- RETVAL = NULL;
+ RETVAL = "";
#endif
OUTPUT:
RETVAL
}
sub gets {
- local($.);
- #<IN>;
&readline("cont: ");
}
}
sub readline {
+ local $.;
if (@typeahead) {
my $left = @typeahead;
my $got = shift @typeahead;
00ba
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
0386
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
+1ff6 1ffc
207f
2102
2107
00ba
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
0386
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
+1ff6 1ffc
207f
2102
2107
00ba
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
0386
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
+1ff6 1ffc
207f
2102
2107
@todo = (
# typical
- ['IsWord', '$cat =~ /^L[ulo]|^Nd/ or $code eq "005F"', ''],
- ['IsAlnum', '$cat =~ /^L[ulo]|^Nd/', ''],
- ['IsAlpha', '$cat =~ /^L[ulo]/', ''],
+ ['IsWord', '$cat =~ /^L[ulot]|^Nd/ or $code eq "005F"', ''],
+ ['IsAlnum', '$cat =~ /^L[ulot]|^Nd/', ''],
+ ['IsAlpha', '$cat =~ /^L[ulot]/', ''],
+ # XXX broken: recursive definition (/\s/ will look up IsSpace in future)
['IsSpace', '$cat =~ /^Z/ or $code lt "0020" and chr(hex $code) =~ /^\s/', ''],
['IsDigit', '$cat =~ /^Nd$/', ''],
['IsUpper', '$cat =~ /^Lu$/', ''],
These expressions will get run-time errors in some future release of
Perl.
-=head2 Windows 2000
-
-Windows 2000 is known to fail test 22 in lib/open3.t (cause unknown at
-this time). That test passes under Windows NT.
-
=head2 Experimental features
As discussed above, many features are still experimental. Interfaces and
}
else {
init_stacks();
+ ENTER; /* perl_destruct() wants to LEAVE; */
}
PL_start_env = proto_perl->Tstart_env; /* XXXXXX */
ok;
my $a = `$^X -I../lib -MO=Deparse -anle 1 2>&1`;
+$a =~ s/-e syntax OK\n//g;
$b = <<'EOF';
--e syntax OK
LINE: while (defined($_ = <ARGV>)) {
chomp $_;
}
EOF
-print "not " if $a ne $b;
+print "# [$a]\n\# vs\n# [$b]\nnot " if $a ne $b;
ok;
#6
/\bLISTOP\b.*leave.*\bOP\b.*enter.*\bCOP\b.*nextstate.*\bOP\b.*null/s;
ok;
-$a = `$^X -I../lib -MO=Terse -ane 's/foo/bar/' 2>&1`;
+$a = `$^X -I../lib -MO=Terse -ane "s/foo/bar/" 2>&1`;
$a =~ s/\(0x[^)]+\)//g;
$a =~ s/\[[^\]]+\]//g;
$a =~ s/-e syntax OK//;
chomp($a = `$^X -I../lib -MB::Stash -Mwarnings -e1`);
$a = join ',', sort split /,/, $a;
+$a =~ s/-uWin32,//;
$b = '-uCarp,-uCarp::Heavy,-uDB,-uExporter,-uExporter::Heavy,-uattributes,'
. '-umain,-uwarnings';
print "# [$a] vs [$b]\nnot " if $a ne $b;
use IPC::Open3;
#require 'open3.pl'; use subs 'open3';
-my $perl = './perl';
+my $perl = $^X;
sub ok {
my ($n, $result, $info) = @_;
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";
+if (Sys::Syslog::_PATH_LOG()) {
+ 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";
+}
+else {
+ for (1..3) { print "ok $_ # skipping, _PATH_LOG unavailable\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";
default:
{
dTHR;
- if (ckWARN(WARN_MISC) && isALPHA(*s))
+ if (ckWARN(WARN_MISC) && isALNUM(*s))
Perl_warner(aTHX_ WARN_MISC,
"Unrecognized escape \\%c passed through",
*s);
/* Visual C thinks that a pointer to a member variable is 16 bytes in size. */
#define PERL_MEMBER_PTR_SIZE 16
+#define isnan _isnan
+
#endif /* _MSC_VER */
#ifdef __MINGW32__ /* Minimal Gnu-Win32 */