Change 18221 by [EMAIL PROTECTED] on 2002/12/02 02:18:19

        integrate 5.8-maint: changes #18174 18187 18189-92 18202 18209 18214-5

Affected files ...

.... //depot/perl/INSTALL#117 integrate
.... //depot/perl/MANIFEST#954 integrate
.... //depot/perl/README.os2#28 integrate
.... //depot/perl/ext/Fcntl/t/syslfs.t#3 integrate
.... //depot/perl/ext/GDBM_File/GDBM_File.pm#20 integrate
.... //depot/perl/ext/GDBM_File/Makefile.PL#11 integrate
.... //depot/perl/ext/POSIX/t/is.t#1 branch
.... //depot/perl/lib/Unicode/UCD.pm#26 integrate
.... //depot/perl/lib/Unicode/UCD.t#15 integrate
.... //depot/perl/pod/perldiag.pod#322 integrate
.... //depot/perl/t/op/eval.t#22 integrate
.... //depot/perl/t/op/grep.t#4 integrate
.... //depot/perl/t/op/lfs.t#20 integrate
.... //depot/perl/t/op/subst.t#36 integrate

Differences ...

==== //depot/perl/INSTALL#117 (text) ====
Index: perl/INSTALL
--- perl/INSTALL#116~17967~     Wed Oct  2 08:04:57 2002
+++ perl/INSTALL        Sun Dec  1 18:18:19 2002
@@ -1722,6 +1722,13 @@
 break utime() so that over NFS the timestamps do not get changed
 (on local filesystems utime() still works).
 
+Building Perl on a system that has also BIND (headers and libraries)
+installed may run into troubles because BIND installs its own netdb.h
+and socket.h, which may not agree with the operating system's ideas of
+the same files.  Similarly, including -lbind may conflict with libc's
+view of the world.  You may have to tweak -Dlocincpth and -Dloclibpth
+to avoid the BIND.
+
 =back
 
 =head2 Cross-compilation

==== //depot/perl/MANIFEST#954 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#953~18169~    Thu Nov 21 12:49:36 2002
+++ perl/MANIFEST       Sun Dec  1 18:18:19 2002
@@ -563,6 +563,7 @@
 ext/POSIX/POSIX.pm             POSIX extension Perl module
 ext/POSIX/POSIX.pod            POSIX extension documentation
 ext/POSIX/POSIX.xs             POSIX extension external subroutines
+ext/POSIX/t/is.t               See if POSIX isxxx() work
 ext/POSIX/t/posix.t            See if POSIX works
 ext/POSIX/t/sigaction.t                See if POSIX::sigaction works
 ext/POSIX/t/taint.t            See if POSIX works with taint

==== //depot/perl/README.os2#28 (text) ====
Index: perl/README.os2
--- perl/README.os2#27~17525~   Sat Jul 13 15:31:07 2002
+++ perl/README.os2     Sun Dec  1 18:18:19 2002
@@ -907,7 +907,7 @@
 Quick cycle of developers release may break the OS/2 build time to
 time, looking into 
 
-  http://www.cpan.org/ports/os2/ilyaz/
+  http://www.cpan.org/ports/os2/
 
 may indicate the latest release which was publicly released by the
 maintainer. Note that the release may include some additional patches

==== //depot/perl/ext/Fcntl/t/syslfs.t#3 (text) ====
Index: perl/ext/Fcntl/t/syslfs.t
--- perl/ext/Fcntl/t/syslfs.t#2~18122~  Thu Nov  7 05:40:25 2002
+++ perl/ext/Fcntl/t/syslfs.t   Sun Dec  1 18:18:19 2002
@@ -262,10 +262,10 @@
 
 END {
     # unlink may fail if applied directly to a large file
-    open(BIG, ">big");
-    print BIG "x";
+    # be paranoid about leaving 5 gig files lying around
+    open(BIG, ">big"); # truncate
     close(BIG);
-    unlink "big"; # be paranoid about leaving 5 gig files lying around
+    1 while unlink "big"; # standard portable idiom
 }
 
 # eof

==== //depot/perl/ext/GDBM_File/GDBM_File.pm#20 (text) ====
Index: perl/ext/GDBM_File/GDBM_File.pm
--- perl/ext/GDBM_File/GDBM_File.pm#19~12277~   Sat Sep 29 17:31:07 2001
+++ perl/ext/GDBM_File/GDBM_File.pm     Sun Dec  1 18:18:19 2002
@@ -31,6 +31,8 @@
 
 The available functions and the gdbm/perl interface need to be documented.
 
+The GDBM error number and error message interface needs to be added.
+
 =head1 SEE ALSO
 
 L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>. 
@@ -50,17 +52,23 @@
 @ISA = qw(Tie::Hash Exporter);
 @EXPORT = qw(
        GDBM_CACHESIZE
+       GDBM_CENTFREE
+       GDBM_COALESCEBLKS
        GDBM_FAST
+       GDBM_FASTMODE
        GDBM_INSERT
        GDBM_NEWDB
        GDBM_NOLOCK
+       GDBM_OPENMASK
        GDBM_READER
        GDBM_REPLACE
+       GDBM_SYNC
+       GDBM_SYNCMODE
        GDBM_WRCREAT
        GDBM_WRITER
 );
 
-$VERSION = "1.06";
+$VERSION = "1.07";
 
 sub AUTOLOAD {
     my($constname);

==== //depot/perl/ext/GDBM_File/Makefile.PL#11 (text) ====
Index: perl/ext/GDBM_File/Makefile.PL
--- perl/ext/GDBM_File/Makefile.PL#10~16233~    Sat Apr 27 15:17:57 2002
+++ perl/ext/GDBM_File/Makefile.PL      Sun Dec  1 18:18:19 2002
@@ -12,7 +12,8 @@
     NAME => 'GDBM_File',
     DEFAULT_TYPE => 'IV',
     BREAKOUT_AT => 8,
-    NAMES => [qw(GDBM_CACHESIZE GDBM_FAST GDBM_FASTMODE GDBM_INSERT GDBM_NEWDB
-                 GDBM_NOLOCK GDBM_READER GDBM_REPLACE GDBM_WRCREAT
-                 GDBM_WRITER)],
+    NAMES => [qw(GDBM_CACHESIZE GDBM_CENTFREE GDBM_COALESCEBLKS
+                GDBM_FAST GDBM_FASTMODE GDBM_INSERT GDBM_NEWDB GDBM_NOLOCK
+                GDBM_OPENMASK GDBM_READER GDBM_REPLACE GDBM_SYNC GDBM_SYNCMODE
+                GDBM_WRCREAT GDBM_WRITER)],
 );

==== //depot/perl/ext/POSIX/t/is.t#1 (text) ====
Index: perl/ext/POSIX/t/is.t
--- /dev/null   Tue May  5 13:32:27 1998
+++ perl/ext/POSIX/t/is.t       Sun Dec  1 18:18:19 2002
@@ -0,0 +1,86 @@
+#!./perl -w
+
+BEGIN {
+    chdir 't' if -d 't';
+    @INC = '../lib';
+    require Config; import Config;
+    if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
+       print "1..0\n";
+       exit 0;
+    }
+}
+
+
+use POSIX;
+use strict ;
+
+$| = 1;
+
+
+# List of characters (and strings) to feed to the is<xxx> functions.
+#
+# The left-hand side (key) is a character or string.
+# The right-hand side (value) is a list of character classes to which
+# this string belongs.  This is a *complete* list: any classes not
+# listed, are expected to return '0' for the given string.
+my %classes =
+  (
+   'a'    => [ qw(print graph alnum alpha lower xdigit) ],
+   'A'    => [ qw(print graph alnum alpha upper xdigit) ],
+   'z'    => [ qw(print graph alnum alpha lower) ],
+   'Z'    => [ qw(print graph alnum alpha upper) ],
+   '0'    => [ qw(print graph alnum digit xdigit) ],
+   '9'    => [ qw(print graph alnum digit xdigit) ],
+   '.'    => [ qw(print graph punct) ],
+   '?'    => [ qw(print graph punct) ],
+   ' '    => [ qw(print space) ],
+   "\t"   => [ qw(cntrl space) ],
+   "\001" => [ qw(cntrl) ],
+
+   # Multi-character strings.  These are logically ANDed, so the
+   # presence of different types of chars in one string will
+   # reduce the list on the right.
+   'abc'       => [ qw(print graph alnum alpha lower xdigit) ],
+   'az'        => [ qw(print graph alnum alpha lower) ],
+   'aZ'        => [ qw(print graph alnum alpha) ],
+   'abc '      => [ qw(print) ],
+
+   '012aF'     => [ qw(print graph alnum xdigit) ],
+
+   " \t"       => [ qw(space) ],
+
+   "abcde\001" => [],
+  );
+
+
+# Pass 1: convert the above arrays to hashes.  While doing so, obtain
+# a complete list of all the 'is<xxx>' functions.  At least, the ones
+# listed above.
+my %functions;
+foreach my $s (keys %classes) {
+    $classes{$s} = { map {
+       $functions{"is$_"}++;   # Keep track of all the 'is<xxx>' functions
+       "is$_" => 1;            # Our return value: is<xxx>($s) should pass.
+    } @{$classes{$s}} };
+}
+
+# Expected number of tests is one each for every combination of a
+# known is<xxx> function and string listed above.
+require './test.pl';
+plan(tests => keys(%classes) * keys(%functions));
+
+
+#
+# Main test loop: Run all POSIX::is<xxx> tests on each string defined above.
+# Only the character classes listed for that string should return 1.  We
+# always run all functions on every string, and expect to get 0 for the
+# character classes not listed in the given string's hash value.
+#
+foreach my $s (sort keys %classes) {
+    foreach my $f (sort keys %functions) {
+       my $expected = exists $classes{$s}->{$f};
+       my $actual   = eval "POSIX::$f( \$s )";
+
+       ok( $actual == $expected, "$f('$s') == $actual");
+    }
+}

==== //depot/perl/lib/Unicode/UCD.pm#26 (text) ====
Index: perl/lib/Unicode/UCD.pm
--- perl/lib/Unicode/UCD.pm#25~15552~   Wed Mar 27 12:52:19 2002
+++ perl/lib/Unicode/UCD.pm     Sun Dec  1 18:18:19 2002
@@ -295,6 +295,7 @@
 sub _charblocks {
     unless (@BLOCKS) {
        if (openunicode(\$BLOCKSFH, "Blocks.txt")) {
+           local $_;
            while (<$BLOCKSFH>) {
                if (/^([0-9A-F]+)\.\.([0-9A-F]+);\s+(.+)/) {
                    my ($lo, $hi) = (hex($1), hex($2));
@@ -356,6 +357,7 @@
 sub _charscripts {
     unless (@SCRIPTS) {
        if (openunicode(\$SCRIPTSFH, "Scripts.txt")) {
+           local $_;
            while (<$SCRIPTSFH>) {
                if (/^([0-9A-F]+)(?:\.\.([0-9A-F]+))?\s+;\s+(\w+)/) {
                    my ($lo, $hi) = (hex($1), $2 ? hex($2) : hex($1));
@@ -493,6 +495,7 @@
 sub _compexcl {
     unless (%COMPEXCL) {
        if (openunicode(\$COMPEXCLFH, "CompositionExclusions.txt")) {
+           local $_;
            while (<$COMPEXCLFH>) {
                if (/^([0-9A-F]+)\s+\#\s+/) {
                    my $code = hex($1);
@@ -563,6 +566,7 @@
 sub _casefold {
     unless (%CASEFOLD) {
        if (openunicode(\$CASEFOLDFH, "CaseFolding.txt")) {
+           local $_;
            while (<$CASEFOLDFH>) {
                if (/^([0-9A-F]+); ([CFSI]); ([0-9A-F]+(?: [0-9A-F]+)*);/) {
                    my $code = hex($1);
@@ -643,6 +647,7 @@
 sub _casespec {
     unless (%CASESPEC) {
        if (openunicode(\$CASESPECFH, "SpecialCasing.txt")) {
+           local $_;
            while (<$CASESPECFH>) {
                if (/^([0-9A-F]+); ([0-9A-F]+(?: [0-9A-F]+)*)?; ([0-9A-F]+(?: 
[0-9A-F]+)*)?; ([0-9A-F]+(?: [0-9A-F]+)*)?; (\w+(?: \w+)*)?/) {
                    my ($hexcode, $lower, $title, $upper, $condition) =

==== //depot/perl/lib/Unicode/UCD.t#15 (text) ====
Index: perl/lib/Unicode/UCD.t
--- perl/lib/Unicode/UCD.t#14~16882~    Thu May 30 06:29:13 2002
+++ perl/lib/Unicode/UCD.t      Sun Dec  1 18:18:19 2002
@@ -12,7 +12,7 @@
 use Unicode::UCD;
 use Test::More;
 
-BEGIN { plan tests => 162 };
+BEGIN { plan tests => 164 };
 
 use Unicode::UCD 'charinfo';
 
@@ -279,3 +279,13 @@
    $casespec->{az}->{upper} eq '0307' &&
    $casespec->{az}->{condition} eq 'az After_Soft_Dotted',
    'casespec 0x307');
+
+# perl #7305 UnicodeCD::compexcl is weird
+
+for (1) {$a=compexcl $_}
+ok(1, 'compexcl read-only $_: perl #7305');
+grep {compexcl $_} %{{1=>2}};
+ok(1, 'compexcl read-only hash: perl #7305');
+
+
+ 

==== //depot/perl/pod/perldiag.pod#322 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod#321~18115~    Wed Nov  6 12:43:14 2002
+++ perl/pod/perldiag.pod       Sun Dec  1 18:18:19 2002
@@ -1504,17 +1504,19 @@
 
 =item Filehandle %s opened only for input
 
-(W io) You tried to write on a read-only filehandle.  If you intended it
-to be a read-write filehandle, you needed to open it with "+<" or "+>"
-or "+>>" instead of with "<" or nothing.  If you intended only to write
-the file, use ">" or ">>".  See L<perlfunc/open>.
+(W io) You tried to write on a read-only filehandle.  If you intended
+it to be a read-write filehandle, you needed to open it with "+<" or
+"+>" or "+>>" instead of with "<" or nothing.  If you intended only to
+write the file, use ">" or ">>".  See L<perlfunc/open>.
 
 =item Filehandle %s opened only for output
 
-(W io) You tried to read from a filehandle opened only for writing.
-If you intended it to be a read/write filehandle, you needed to open it
+(W io) You tried to read from a filehandle opened only for writing, If
+you intended it to be a read/write filehandle, you needed to open it
 with "+<" or "+>" or "+>>" instead of with "<" or nothing.  If you
 intended only to read from the file, use "<".  See L<perlfunc/open>.
+Another possibility is that you attempted to open filedescriptor 0
+(also known as STDIN) for output (maybe you closed STDIN earlier?).
 
 =item Filehandle %s reopened as %s only for input
 

==== //depot/perl/t/op/eval.t#22 (xtext) ====
Index: perl/t/op/eval.t
--- perl/t/op/eval.t#21~18220~  Sun Dec  1 16:58:54 2002
+++ perl/t/op/eval.t    Sun Dec  1 18:18:19 2002
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..77\n";
+print "1..78\n";
 
 eval 'print "ok 1\n";';
 
@@ -241,6 +241,12 @@
     $@ = 5;
     eval q{};
     print length($@) ? "not ok 46\t# \$\@ = '$@'\n" : "ok 46\n";
+}
+# [perl #9728] used to dump core
+{
+   $eval = eval 'sub { eval "sub { %S }" }';
+   $eval->({});
+   print "ok 47\n";
 }
 
 # DAPM Nov-2002. Perl should now capture the full lexical context during

==== //depot/perl/t/op/grep.t#4 (xtext) ====
Index: perl/t/op/grep.t
--- perl/t/op/grep.t#3~17998~   Fri Oct 11 12:53:05 2002
+++ perl/t/op/grep.t    Sun Dec  1 18:18:19 2002
@@ -4,7 +4,7 @@
 # grep() and map() tests
 #
 
-print "1..32\n";
+print "1..33\n";
 
 $test = 1;
 
@@ -128,4 +128,10 @@
     print "# @x,$y\n";
     print "@x,$y" eq "3 4,1212" ? "ok $test\n" : "not ok $test\n";
     $test++;
+
+    # Add also a sample test from [perl #18153].  (The same bug).
+    $a = 1; map {if ($a){}} (2);
+    print "ok $test\n"; # no core dump is all we need
+    $test++;
 }
+

==== //depot/perl/t/op/lfs.t#20 (text) ====
Index: perl/t/op/lfs.t
--- perl/t/op/lfs.t#19~18122~   Thu Nov  7 05:40:25 2002
+++ perl/t/op/lfs.t     Sun Dec  1 18:18:19 2002
@@ -269,10 +269,10 @@
 
 END {
     # unlink may fail if applied directly to a large file
-    open(BIG, ">big");
-    print BIG "x";
+    # be paranoid about leaving 5 gig files lying around
+    open(BIG, ">big"); # truncate
     close(BIG);
-    unlink "big"; # be paranoid about leaving 5 gig files lying around
+    1 while unlink "big"; # standard portable idiom
 }
 
 # eof

==== //depot/perl/t/op/subst.t#36 (xtext) ====
Index: perl/t/op/subst.t
--- perl/t/op/subst.t#35~17504~ Fri Jul 12 06:53:15 2002
+++ perl/t/op/subst.t   Sun Dec  1 18:18:19 2002
@@ -7,7 +7,7 @@
 }
 
 require './test.pl';
-plan( tests => 122 );
+plan( tests => 124 );
 
 $x = 'foo';
 $_ = "x";
@@ -490,4 +490,13 @@
     ($b = $a) =~ s/-($ud)?-/--$na--/;
     is($b, "$na--$na--$nb", "s///: replace long non-utf8 into non-utf8 (utf8 
pattern)");
 }
+
+$_ = 'aaaa';
+$r = 'x';
+$s = s/a(?{})/$r/g;
+is("<$_> <$s>", "<xxxx> <4>", "perl #7806");
+
+$_ = 'aaaa';
+$s = s/a(?{})//g;
+is("<$_> <$s>", "<> <4>", "perl #7806");
 
End of Patch.

Reply via email to