4 if (@ARGV && $ARGV[0] eq '--check-version') {
6 (my $file = "$module.pm") =~ s{::}{/}g;
9 my $version = do { no strict; ${"${module}::VERSION"} };
21 delete $ENV{PERL5LIB};
22 delete $ENV{PERL_LOCAL_LIB_ROOT};
23 delete $ENV{PERL_MM_OPT};
24 delete $ENV{PERL_MB_OPT};
26 #my @ll_path = File::Spec->splitpath($INC{'local/lib.pm'});
27 #my @ll_dir = File::Spec->splitdir($ll_path[1]);
28 #my $ll_dir = File::Spec->catpath($ll_path[0], File::Spec->catdir(@ll_dir[0 .. $#_-1]), '');
32 my $version = `$^X $0 --check-version $module`;
34 length $version ? $version : undef;
38 [ 'ExtUtils::MakeMaker' => 6.74 ],
39 [ 'ExtUtils::Install' => 1.43 ],
40 [ 'Module::Build' => 0.36 ],
43 plan tests => 1+@modules;
45 for my $module (@modules) {
46 my $version = check_version($module->[0]);
47 if ($version && $version >= $module->[1]) {
48 warn "Can't test bootstrap of $module->[0], version $version already meets requirement of $module->[1]\n";
52 $ENV{HOME} = my $home = File::Temp::tempdir( CLEANUP => 1 );
55 system($^X, 'Makefile.PL', '--bootstrap');
56 is $?, 0, 'Makefile.PL ran successfully';
58 for my $module (@modules) {
59 my $version = check_version($module->[0]);
60 cmp_ok $version, '>=', $module->[1], "bootstrap installed new enough $module->[0]";