Change 18434: Forgot to add problems.t with change #18419

2003-01-04 Thread Arthur Bergman
Change 18434 by sky@sky-tibook on 2003/01/04 07:43:50

Forgot to add problems.t with change #18419

Affected files ...

... //depot/perl/ext/threads/t/problems.t#1 add

Differences ...

 //depot/perl/ext/threads/t/problems.t#1 (text) 
Index: perl/ext/threads/t/problems.t
--- /dev/null   Tue May  5 13:32:27 1998
+++ perl/ext/threads/t/problems.t   Fri Jan  3 23:43:50 2003
@@ -0,0 +1,55 @@
+
+BEGIN {
+chdir 't' if -d 't';
+@INC = '../lib';
+require Config; import Config;
+unless ($Config{'useithreads'}) {
+   print 1..0 # Skip: no useithreads\n;
+   exit 0; 
+}
+}
+
+use ExtUtils::testlib;
+use strict;
+use threads;
+use threads::shared;
+use Test::More tests = 4;
+
+
+#
+# This tests for too much destruction
+# which was caused by cloning stashes
+# on join which led to double the dataspace
+#
+#
+
+$|++;
+use Devel::Peek;
+
+
+{ 
+
+sub Foo::DESTROY { 
+   my $self = shift;
+   my ($package, $file, $line) = caller;
+   is(threads-tid(),$self-{tid}, In destroy it should be correct too )
+}
+my $foo;
+$foo = bless {tid = 0}, 'Foo';  
+my $bar = threads-create(sub { 
+   is(threads-tid(),1, And tid be 10 here);
+   $foo-{tid} = 1;
+   return $foo;
+})-join();
+$bar-{tid} = 0;
+
+
+}
+1;
+
+
+
+
+
+
+
End of Patch.




Change 18437: Integrate:

2003-01-04 Thread Jarkko Hietaniemi
Change 18437 by jhi@lyta on 2003/01/04 14:39:35

Integrate:
[ 18434]
Forgot to add problems.t with change #18419

Affected files ...

... //depot/maint-5.8/perl/ext/threads/t/problems.t#1 branch

Differences ...

 //depot/maint-5.8/perl/ext/threads/t/problems.t#1 (text) 
Index: perl/ext/threads/t/problems.t
--- /dev/null   Tue May  5 13:32:27 1998
+++ perl/ext/threads/t/problems.t   Sat Jan  4 06:39:35 2003
@@ -0,0 +1,55 @@
+
+BEGIN {
+chdir 't' if -d 't';
+@INC = '../lib';
+require Config; import Config;
+unless ($Config{'useithreads'}) {
+   print 1..0 # Skip: no useithreads\n;
+   exit 0; 
+}
+}
+
+use ExtUtils::testlib;
+use strict;
+use threads;
+use threads::shared;
+use Test::More tests = 4;
+
+
+#
+# This tests for too much destruction
+# which was caused by cloning stashes
+# on join which led to double the dataspace
+#
+#
+
+$|++;
+use Devel::Peek;
+
+
+{ 
+
+sub Foo::DESTROY { 
+   my $self = shift;
+   my ($package, $file, $line) = caller;
+   is(threads-tid(),$self-{tid}, In destroy it should be correct too )
+}
+my $foo;
+$foo = bless {tid = 0}, 'Foo';  
+my $bar = threads-create(sub { 
+   is(threads-tid(),1, And tid be 10 here);
+   $foo-{tid} = 1;
+   return $foo;
+})-join();
+$bar-{tid} = 0;
+
+
+}
+1;
+
+
+
+
+
+
+
End of Patch.




Change 18435: The problems.t is back.

2003-01-04 Thread Jarkko Hietaniemi
Change 18435 by jhi@lyta on 2003/01/04 14:36:08

The problems.t is back.

Affected files ...

... //depot/perl/MANIFEST#962 edit

Differences ...

 //depot/perl/MANIFEST#962 (text) 
Index: perl/MANIFEST
--- perl/MANIFEST#961~18425~Fri Jan  3 19:37:04 2003
+++ perl/MANIFEST   Sat Jan  4 06:36:08 2003
@@ -700,6 +700,7 @@
 ext/threads/t/join.t   Testing the join function
 ext/threads/t/libc.t   testing libc functions for threadsafety
 ext/threads/t/list.t   Test threads-list()
+ext/threads/t/problems.t   Test various memory problems
 ext/threads/t/stress_cv.t  Test with multiple threads, coderef cv argument.
 ext/threads/t/stress_re.t  Test with multiple threads, string cv argument and 
regexes.
 ext/threads/t/stress_string.t  Test with multiple threads, string cv argument.
End of Patch.




Change 18436: Integrate:

2003-01-04 Thread Jarkko Hietaniemi
Change 18436 by jhi@lyta on 2003/01/04 14:37:33

Integrate:
[ 18435]
The problems.t is back.

Affected files ...

... //depot/maint-5.8/perl/MANIFEST#17 integrate

Differences ...

 //depot/maint-5.8/perl/MANIFEST#17 (text) 
Index: perl/MANIFEST
--- perl/MANIFEST#16~18426~ Fri Jan  3 19:38:27 2003
+++ perl/MANIFEST   Sat Jan  4 06:37:33 2003
@@ -701,6 +701,7 @@
 ext/threads/t/join.t   Testing the join function
 ext/threads/t/libc.t   testing libc functions for threadsafety
 ext/threads/t/list.t   Test threads-list()
+ext/threads/t/problems.t   Test various memory problems
 ext/threads/t/stress_cv.t  Test with multiple threads, coderef cv argument.
 ext/threads/t/stress_re.t  Test with multiple threads, string cv argument and 
regexes.
 ext/threads/t/stress_string.t  Test with multiple threads, string cv argument.
End of Patch.




Change 18439: [PATCH] [perl #15184] ExtUtils/t/Embed.t fails with -Duseshrplib -Dlibperl=...

2003-01-04 Thread Rafael Garcia-Suarez
Change 18439 by rgs@rgs-home on 2003/01/04 15:34:54

Subject: [PATCH] [perl #15184] ExtUtils/t/Embed.t fails with -Duseshrplib 
-Dlibperl=...
From: Rafael Garcia-Suarez [EMAIL PROTECTED]
Date: Fri, 13 Dec 2002 00:54:43 +0100
Message-Id: [EMAIL PROTECTED]
Same as change 18403 for maint-5.8 branch

Affected files ...

... //depot/perl/lib/ExtUtils/t/Embed.t#13 edit

Differences ...

 //depot/perl/lib/ExtUtils/t/Embed.t#13 (text) 
Index: perl/lib/ExtUtils/t/Embed.t
--- perl/lib/ExtUtils/t/Embed.t#12~16836~   Tue May 28 06:43:39 2002
+++ perl/lib/ExtUtils/t/Embed.t Sat Jan  4 07:34:54 2003
@@ -102,7 +102,7 @@
  # Everyone needs libperl copied if it's not found by '-lperl'.
  $testlib = $Config{'libperl'};
  my $srclib = $testlib;
- $testlib =~ s/^[^.]+/libperl/;
+ $testlib =~ s/.+(?=\.[^.]*)/libperl/;
  $testlib = File::Spec::-catfile($lib, $testlib);
  $srclib = File::Spec::-catfile($lib, $srclib);
  if (-f $srclib) {
End of Patch.




Change 18438: Re: [PATCH] Tiny nits in perlre.pod

2003-01-04 Thread Rafael Garcia-Suarez
Change 18438 by rgs@rgs-home on 2003/01/04 15:24:22

Subject: Re: [PATCH] Tiny nits in perlre.pod
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Date: Fri, 03 Jan 2003 00:57:15 +0100
Message-ID: [EMAIL PROTECTED]

Affected files ...

... //depot/perl/pod/perlre.pod#81 edit

Differences ...

 //depot/perl/pod/perlre.pod#81 (text) 
Index: perl/pod/perlre.pod
--- perl/pod/perlre.pod#80~18299~   Thu Dec 12 12:35:29 2002
+++ perl/pod/perlre.pod Sat Jan  4 07:24:22 2003
@@ -6,7 +6,7 @@
 
 This page describes the syntax of regular expressions in Perl.  
 
-if you haven't used regular expressions before, a quick-start
+If you haven't used regular expressions before, a quick-start
 introduction is available in Lperlrequick, and a longer tutorial
 introduction is available in Lperlretut.
 
@@ -564,7 +564,7 @@
 BWARNING: This extended regular expression feature is considered
 highly experimental, and may be changed or deleted without notice.
 
-This zero-width assertion evaluate any embedded Perl code.  It
+This zero-width assertion evaluates any embedded Perl code.  It
 always succeeds, and its Ccode is not interpolated.  Currently,
 the rules to determine where the Ccode ends are somewhat convoluted.
 
@@ -627,7 +627,7 @@
 you turn on the Cuse re 'eval', though, it is no longer secure,
 so you should only do so if you are also using taint checking.
 Better yet, use the carefully constrained evaluation within a Safe
-module.  See Lperlsec for details about both these mechanisms.
+compartment.  See Lperlsec for details about both these mechanisms.
 
 =item C(??{ code })
 
End of Patch.




Change 18440: Integrate change #18420 from maint-5.8:

2003-01-04 Thread Rafael Garcia-Suarez
Change 18440 by rgs@rgs-home on 2003/01/04 16:31:31

Integrate change #18420 from maint-5.8:
Mea culpa: the join() was the string join, not the
ithreads join().

Affected files ...

... //depot/perl/ext/threads/t/join.t#4 integrate

Differences ...

 //depot/perl/ext/threads/t/join.t#4 (text) 
Index: perl/ext/threads/t/join.t
--- perl/ext/threads/t/join.t#3~18239~  Tue Dec  3 04:49:01 2002
+++ perl/ext/threads/t/join.t   Sat Jan  4 08:31:31 2003
@@ -93,17 +93,19 @@
 
 if ($^O eq 'linux') { # We parse ps output so this is OS-dependent.
   # First modify $0 in a subthread.
-  print # 1a: \$0 = $0\n;
-  join( threads-new( sub {
-   print # 2a: \$0 = $0\n;
-   $0 = foobar;
-   print # 2b: \$0 = $0\n } ) );
-  print # 1b: \$0 = $0\n;
-  if (open PS, ps -f |) {
+  print # mainthread: \$0 = $0\n;
+  threads-new( sub {
+ print # subthread: \$0 = $0\n;
+ $0 = foobar;
+ print # subthread: \$0 = $0\n } )-join;
+  print # mainthread: \$0 = $0\n;
+  print # pid = $$\n;
+  if (open PS, ps -f |) { # Note: must work in (all) Linux(es).
 my $ok;
 while (PS) {
-  print # $_;
-  if (/^\S+\s+$$\s.+\sfoobar\s*$/) {
+  s/\s+$//; # there seems to be extra whitespace at the end by ps(1)?
+  print # $_\n;
+  if (/^\S+\s+$$\s.+\sfoobar$/) {
$ok++;
last;
   }
End of Patch.




Change 18441: [DOCPATCH] File::Copy's synopsis

2003-01-04 Thread Rafael Garcia-Suarez
Change 18441 by rgs@rgs-home on 2003/01/04 20:06:45

Subject: [DOCPATCH] File::Copy's synopsis
From: Nicholas Clark [EMAIL PROTECTED]
Date: Wed, 1 Jan 2003 21:09:30 +
Message-ID: [EMAIL PROTECTED]

Affected files ...

... //depot/perl/lib/File/Copy.pm#30 edit

Differences ...

 //depot/perl/lib/File/Copy.pm#30 (text) 
Index: perl/lib/File/Copy.pm
--- perl/lib/File/Copy.pm#29~18280~ Tue Dec 10 13:30:10 2002
+++ perl/lib/File/Copy.pm   Sat Jan  4 12:06:45 2003
@@ -269,13 +269,13 @@
 
 =head1 SYNOPSIS
 
-   use File::Copy;
+   use File::Copy;
 
-   copy(file1,file2);
-   copy(Copy.pm,\*STDOUT);'
+   copy(file1,file2) or die Copy failed: $!;
+   copy(Copy.pm,\*STDOUT);
move(/dev1/fileA,/dev2/fileB);
 
-   use POSIX;
+   use POSIX;
use File::Copy cp;
 
$n = FileHandle-new(/a/file,r);
End of Patch.




Change 18442: Spotted by rgs.

2003-01-04 Thread Jarkko Hietaniemi
Change 18442 by jhi@lyta on 2003/01/04 21:18:39

Spotted by rgs.

Affected files ...

... //depot/maint-5.8/perl/lib/File/Copy.pm#4 edit

Differences ...

 //depot/maint-5.8/perl/lib/File/Copy.pm#4 (text) 
Index: perl/lib/File/Copy.pm
--- perl/lib/File/Copy.pm#3~18398~  Thu Jan  2 18:26:44 2003
+++ perl/lib/File/Copy.pm   Sat Jan  4 13:18:39 2003
@@ -272,7 +272,7 @@
use File::Copy;
 
copy(file1,file2) or die Copy failed: $!;
-   copy(Copy.pm,\*STDOUT);'
+   copy(Copy.pm,\*STDOUT);
move(/dev1/fileA,/dev2/fileB);
 
use POSIX;
End of Patch.