develooper Front page | perl.perl5.porters | Postings from June 2004

[PATCH] Config{extensions} uses filesystem names as extensions

Thread Next
From:
Andy Dougherty
Date:
June 24, 2004 12:09
Subject:
[PATCH] Config{extensions} uses filesystem names as extensions
Message ID:
Pine.SOL.4.58.0406241505530.14039@maxwell.phys.lafayette.edu
Recent patches to the test suite skip various tests if the appropriate
extensions haven't been built.  Unfortunately, Configure stores the
extension names in filesystem format (e.g. as List/Util) rather than
as perl module names (List::Util).

This patch changes all of the skip tests to look for either the filesystem
name or the perl module name.  I don't know how Windows stores the
extension names in $Config{extensions}, so the pattern may need to be
generalized even more.

diff -r -u perl-5.8.x/ext/Devel/PPPort/t/test.t perl-5.8.x-andy/ext/Devel/PPPort/t/test.t
--- perl-5.8.x/ext/Devel/PPPort/t/test.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/ext/Devel/PPPort/t/test.t	Thu Jun 24 11:28:05 2004
@@ -2,7 +2,7 @@
     chdir 't' if -d 't';
     @INC = '../lib' if -d '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bDevel::PPPort\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bDevel(::|\/)PPPort\b/) ){
         print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
         exit 0;
     }
diff -r -u perl-5.8.x/ext/PerlIO/t/scalar.t perl-5.8.x-andy/ext/PerlIO/t/scalar.t
--- perl-5.8.x/ext/PerlIO/t/scalar.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/ext/PerlIO/t/scalar.t	Thu Jun 24 11:28:12 2004
@@ -8,7 +8,7 @@
 	exit 0;
     }
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bPerlIO::scalar\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bPerlIO(::|\/)scalar\b/) ){
         print "1..0 # Skip -- Perl configured without PerlIO::scalar module\n";
         exit 0;
     }
diff -r -u perl-5.8.x/ext/PerlIO/t/via.t perl-5.8.x-andy/ext/PerlIO/t/via.t
--- perl-5.8.x/ext/PerlIO/t/via.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/ext/PerlIO/t/via.t	Thu Jun 24 11:28:16 2004
@@ -8,7 +8,7 @@
 	exit 0;
     }
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bPerlIO::via\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bPerlIO(::|\/)via\b/) ){
         print "1..0 # Skip -- Perl configured without PerlIO::via module\n";
         exit 0;
     }
diff -r -u perl-5.8.x/ext/threads/shared/t/disabled.t perl-5.8.x-andy/ext/threads/shared/t/disabled.t
--- perl-5.8.x/ext/threads/shared/t/disabled.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/ext/threads/shared/t/disabled.t	Thu Jun 24 11:28:18 2004
@@ -6,7 +6,7 @@
     chdir 't';
     @INC = '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bthreads::shared\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bthreads(::|\/)shared\b/) ){
         print "1..0 # Skip -- Perl configured without threads::shared module\n";
         exit 0;
     }
diff -r -u perl-5.8.x/lib/DB.t perl-5.8.x-andy/lib/DB.t
--- perl-5.8.x/lib/DB.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/DB.t	Thu Jun 24 11:28:26 2004
@@ -4,7 +4,7 @@
         chdir 't' if -d 't';
         @INC = '../lib';
 	require Config;
-	if (($Config::Config{'extensions'} !~ /\bList::Util\b/) ){
+	if (($Config::Config{'extensions'} !~ /\bList(::|\/)Util\b/) ){
 		print "1..0 # Skip -- Perl configured without List::Util module\n";
 		exit 0;
 	}
diff -r -u perl-5.8.x/lib/Dumpvalue.t perl-5.8.x-andy/lib/Dumpvalue.t
--- perl-5.8.x/lib/Dumpvalue.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/Dumpvalue.t	Thu Jun 24 11:28:29 2004
@@ -8,7 +8,7 @@
 	    exit 0;
 	}
 	require Config;
-	if (($Config::Config{'extensions'} !~ /\bList::Util\b/) ){
+	if (($Config::Config{'extensions'} !~ /\bList(::|\/)Util\b/) ){
 	    print "1..0 # Skip -- Perl configured without List::Util module\n";
 	    exit 0;
 	}
diff -r -u perl-5.8.x/lib/PerlIO/via/t/QuotedPrint.t perl-5.8.x-andy/lib/PerlIO/via/t/QuotedPrint.t
--- perl-5.8.x/lib/PerlIO/via/t/QuotedPrint.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/PerlIO/via/t/QuotedPrint.t	Thu Jun 24 11:28:59 2004
@@ -8,7 +8,7 @@
         exit 0;
     }
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bPerlIO::via\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bPerlIO(::|\/)via\b/) ){
         print "1..0 # Skip -- Perl configured without PerlIO::via module\n";
         exit 0;
     }
diff -r -u perl-5.8.x/lib/Tie/RefHash.t perl-5.8.x-andy/lib/Tie/RefHash.t
--- perl-5.8.x/lib/Tie/RefHash.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/Tie/RefHash.t	Thu Jun 24 11:29:04 2004
@@ -14,7 +14,7 @@
     @INC = '.';
     push @INC, '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bData::Dumper\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bData(::|\/)Dumper\b/) ){
 	print "1..0 # Skip -- Perl configured without Data::Dumper module\n";
 	exit 0;
     }
diff -r -u perl-5.8.x/lib/autouse.t perl-5.8.x-andy/lib/autouse.t
--- perl-5.8.x/lib/autouse.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/autouse.t	Thu Jun 24 11:25:29 2004
@@ -4,7 +4,7 @@
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bList::Util\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bList(::|\/)Util\b/) ){
 	print "1..0 # Skip -- Perl configured without List::Util module\n";
 	exit 0;
     }
diff -r -u perl-5.8.x/lib/dumpvar.t perl-5.8.x-andy/lib/dumpvar.t
--- perl-5.8.x/lib/dumpvar.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/dumpvar.t	Thu Jun 24 11:28:32 2004
@@ -4,7 +4,7 @@
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bList::Util\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bList(::|\/)Util\b/) ){
 	print "1..0 # Skip -- Perl configured without List::Util module\n";
 	exit 0;
     }
diff -r -u perl-5.8.x/lib/h2xs.t perl-5.8.x-andy/lib/h2xs.t
--- perl-5.8.x/lib/h2xs.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/h2xs.t	Thu Jun 24 11:28:41 2004
@@ -14,7 +14,7 @@
     @INC = '../lib';
     # FIXME (or rather FIXh2xs)
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bDevel::PPPort\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bDevel(::|\/)PPPort\b/) ){
 	print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
 	exit 0;
     }
diff -r -u perl-5.8.x/lib/overload.t perl-5.8.x-andy/lib/overload.t
--- perl-5.8.x/lib/overload.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/lib/overload.t	Thu Jun 24 11:28:47 2004
@@ -4,7 +4,7 @@
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config;
-    if (($Config::Config{'extensions'} !~ /\bList::Util\b/) ){
+    if (($Config::Config{'extensions'} !~ /\bList(::|\/)Util\b/) ){
 	print "1..0 # Skip -- Perl configured without List::Util module\n";
 	exit 0;
     }
diff -r -u perl-5.8.x/t/io/crlf.t perl-5.8.x-andy/t/io/crlf.t
--- perl-5.8.x/t/io/crlf.t	Wed Jun 23 11:51:10 2004
+++ perl-5.8.x-andy/t/io/crlf.t	Thu Jun 24 11:29:27 2004
@@ -34,7 +34,7 @@
  {
   skip("miniperl can't rely on loading PerlIO::scalar")
       if $ENV{PERL_CORE_MINITEST};
-  skip("no PerlIO::scalar") unless $Config{extensions} =~ /PerlIO::scalar/;
+  skip("no PerlIO::scalar") unless $Config{extensions} =~ /PerlIO(::|\/)scalar/;
   require PerlIO::scalar;
   my $fcontents = join "", map {"$_\015\012"} "a".."zzz";
   open my $fh, "<:crlf", \$fcontents;

-- 
    Andy Dougherty		doughera@lafayette.edu

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About