From a67d7a01fa16f8e2034dee61f11d32c3d49ac7be Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Wed, 22 May 2002 15:14:35 -0400 Subject: [PATCH] ExtUtils::MakeMaker 5.95_01 -> 5.96_01 Message-id: <20020522231434.GR7147@ool-18b93024.dyn.optonline.net> p4raw-id: //depot/perl@16755 --- lib/ExtUtils/Changes | 8 ++++++++ lib/ExtUtils/Command.pm | 6 +++++- lib/ExtUtils/MakeMaker.pm | 6 +++--- lib/ExtUtils/t/basic.t | 9 ++++++++- lib/ExtUtils/t/testlib.t | 5 ++++- lib/ExtUtils/testlib.pm | 12 +++++++++--- 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index 12262d1..56d4435 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,11 @@ +5.96_01 Wed May 22 19:11:09 EDT 2002 + - Fixed ExtUtils::testlib so it doesn't taint @INC. + - Fixed ExtUtils::Command so it groks % shell wildcard on VMS. + [RT 625] + - MM now depends on Test::Harness 2.00 on VMS else tests with -T + won't work, command line too long. + - Added Craig's patch to fix limited level VMSs in the core. + 5.95_01 Sat May 18 14:40:12 EDT 2002 - Fixed ExtUtils::testlib so it has a reasonable chance of working under taint mode. diff --git a/lib/ExtUtils/Command.pm b/lib/ExtUtils/Command.pm index ac83415..b4f66f8 100644 --- a/lib/ExtUtils/Command.pm +++ b/lib/ExtUtils/Command.pm @@ -13,6 +13,8 @@ use vars qw(@ISA @EXPORT $VERSION); @EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f); $VERSION = '1.03_01'; +my $Is_VMS = $^O eq 'VMS'; + =head1 NAME ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc. @@ -48,9 +50,11 @@ Filenames with * and ? will be glob expanded. =cut +# VMS uses % instead of ? to mean "one character" +my $wild_regex = $Is_VMS ? '*%' : '*?'; sub expand_wildcards { - @ARGV = map(/[\*\?]/ ? glob($_) : $_,@ARGV); + @ARGV = map(/[$wild_regex]/o ? glob($_) : $_,@ARGV); } =item cat diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 38871a4..c93365e 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,10 +2,10 @@ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} -$VERSION = "5.95_01"; +$VERSION = "5.96_01"; $Version_OK = "5.49"; # Makefiles older than $Version_OK will die # (Will be checked from MakeMaker version 4.13 onwards) -($Revision = substr(q$Revision: 1.53 $, 10)) =~ s/\s+$//; +($Revision = substr(q$Revision: 1.55 $, 10)) =~ s/\s+$//; require Exporter; use Config; @@ -1817,7 +1817,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ( $VERSION ) = '$Revision: 1.53 $ ' =~ /\$Revision:\s+([^\s]+)/; + ( $VERSION ) = '$Revision: 1.55 $ ' =~ /\$Revision:\s+([^\s]+)/; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t index 740eefd..548e85e 100644 --- a/lib/ExtUtils/t/basic.t +++ b/lib/ExtUtils/t/basic.t @@ -30,7 +30,14 @@ if( $^O eq 'VMS' ) { # in a DCL subprocess and put it in the job table so the parent sees it. open( BFDTMP, '>bfdtesttmp.com' ) || die "Error creating command file; $!"; print BFDTMP <<'COMMAND'; -$ BFD_TEST_ROOT = F$PARSE("[.t]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" +$ IF F$TRNLNM("PERL_CORE") .EQS. "" .AND. F$TYPE(PERL_CORE) .EQS. "" +$ THEN +$! building CPAN version +$ BFD_TEST_ROOT = F$PARSE("[.t]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" +$ ELSE +$! we're in the core +$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" +$ ENDIF $ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT' COMMAND close BFDTMP; diff --git a/lib/ExtUtils/t/testlib.t b/lib/ExtUtils/t/testlib.t index d31396e..6f496a4 100644 --- a/lib/ExtUtils/t/testlib.t +++ b/lib/ExtUtils/t/testlib.t @@ -12,7 +12,7 @@ BEGIN { } chdir 't'; -use Test::More tests => 4; +use Test::More tests => 5; BEGIN { # non-core tests will have blib in their path. We remove it @@ -32,3 +32,6 @@ use_ok( 'ExtUtils::testlib' ); is( @blib_paths, 2, 'ExtUtils::testlib added two @INC dirs!' ); ok( !(grep !File::Spec->file_name_is_absolute($_), @blib_paths), ' and theyre absolute'); + +eval { eval "# @INC"; }; +is( $@, '', '@INC is not tainted' ); diff --git a/lib/ExtUtils/testlib.pm b/lib/ExtUtils/testlib.pm index 3f93135..d8c99bb 100644 --- a/lib/ExtUtils/testlib.pm +++ b/lib/ExtUtils/testlib.pm @@ -1,13 +1,19 @@ package ExtUtils::testlib; -$VERSION = 1.13_01; +$VERSION = 1.14_01; use Cwd; use File::Spec; # So the tests can chdir around and not break @INC. # We use getcwd() because otherwise rel2abs will blow up under taint -# mode pre-5.8 -use lib map File::Spec->rel2abs($_, getcwd()), qw(blib/arch blib/lib); +# mode pre-5.8. We detaint is so @INC won't be tainted. This is +# no worse, and probably better, than just shoving an untainted, +# relative "blib/lib" onto @INC. +my $cwd; +BEGIN { + ($cwd) = getcwd() =~ /(.*)/; +} +use lib map File::Spec->rel2abs($_, $cwd), qw(blib/arch blib/lib); 1; __END__ -- 2.7.4