4 if( $ENV{PERL_CORE} ) {
6 @INC = ('../lib', 'lib');
18 unless( eval { require Data::Dumper } ) {
19 plan skip_all => 'Data::Dumper not available';
25 use MakeMaker::Test::Utils;
26 use MakeMaker::Test::Setup::BFD;
28 # 'make disttest' sets a bunch of environment variables which interfere
30 delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
32 my $Perl = which_perl();
33 my $Makefile = makefile_name();
34 my $Is_VMS = $^O eq 'VMS';
41 ok( setup_recurs(), 'setup' );
43 ok( chdir File::Spec->updir );
44 ok( teardown_recurs(), 'teardown' );
47 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
48 diag("chdir failed: $!");
51 my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=1"});
52 ok( !-r $Makefile, "PREREQ_PRINT produces no $Makefile" );
53 is( $?, 0, ' exited normally' );
55 package _Prereq::Print;
57 $PREREQ_PM = undef; # shut up "used only once" warning.
59 ::is_deeply( $PREREQ_PM, { strict => 0 }, 'prereqs dumped' );
60 ::is( $@, '', ' without error' );
64 $prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"});
65 ok( !-r $Makefile, "PRINT_PREREQ produces no $Makefile" );
66 is( $?, 0, ' exited normally' );
67 ::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x,
72 #my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=0"});
73 #ok( -r $Makefile, "PREREQ_PRINT=0 produces a $Makefile" );
74 #is( $?, 0, ' exited normally' );
78 #my $prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"});
79 #ok( -r $Makefile, "PRINT_PREREQ=0 produces a $Makefile" );
80 #is( $?, 0, ' exited normally' );