1 package MakeMaker::Test::Setup::BFD;
5 @EXPORT = qw(setup_recurs teardown_recurs);
10 use MakeMaker::Test::Utils;
12 my $Is_VMS = $^O eq 'VMS';
15 'Big-Dummy/lib/Big/Dummy.pm' => <<'END',
22 Big::Dummy - Try "our" hot dog's
29 'Big-Dummy/Makefile.PL' => <<'END',
30 use ExtUtils::MakeMaker;
32 # This will interfere with the PREREQ_PRINT tests.
33 printf "Current package is: %s\n", __PACKAGE__ unless "@ARGV" =~ /PREREQ/;
37 VERSION_FROM => 'lib/Big/Dummy.pm',
38 EXE_FILES => [qw(bin/program)],
39 PREREQ_PM => { strict => 0 },
40 ABSTRACT_FROM => 'lib/Big/Dummy.pm',
41 AUTHOR => 'Michael G Schwern <schwern@pobox.com>',
45 'Big-Dummy/bin/program' => <<'END',
50 program - this is a program
57 'Big-Dummy/t/compile.t' => <<'END',
60 print eval "use Big::Dummy; 1;" ? "ok 1\n" : "not ok 1\n";
61 print "ok 2 - TEST_VERBOSE\n";
64 'Big-Dummy/Liar/t/sanity.t' => <<'END',
67 print eval "use Big::Dummy; 1;" ? "ok 1\n" : "not ok 1\n";
68 print eval "use Big::Liar; 1;" ? "ok 2\n" : "not ok 2\n";
69 print "ok 3 - TEST_VERBOSE\n";
72 'Big-Dummy/Liar/lib/Big/Liar.pm' => <<'END',
80 'Big-Dummy/Liar/Makefile.PL' => <<'END',
81 use ExtUtils::MakeMaker;
83 my $mm = WriteMakefile(
85 VERSION_FROM => 'lib/Big/Liar.pm',
86 _KEEP_AFTER_FLUSH => 1
89 print "Big::Liar's vars\n";
90 foreach my $key (qw(INST_LIB INST_ARCHLIB)) {
91 print "$key = $mm->{$key}\n";
100 chdir 'MM_TEST_ROOT:[t]' if $Is_VMS;
102 while(my($file, $text) = each %Files) {
103 # Convert to a relative, native file path.
104 $file = File::Spec->catfile(File::Spec->curdir, split m{\/}, $file);
106 my $dir = dirname($file);
108 open(FILE, ">$file") || die "Can't create $file: $!";
116 sub teardown_recurs {
117 foreach my $file (keys %Files) {
118 my $dir = dirname($file);
120 rmtree($dir) || return;