Commit | Line | Data |
183ac38d |
1 | # Note: this file was auto-generated by Module::Build::Compat version 0.03 |
848ff2a1 |
2 | use ExtUtils::MakeMaker; |
183ac38d |
3 | use FindBin; |
4 | use File::Spec::Functions qw(catfile); |
5 | |
6 | # VOS and VMS can't handle dodgy plugin names |
7 | # and VOS can't even unpack them so we create them on the |
8 | # fly and only run the tests if they're present |
9 | my %dodgy_files = ( |
10 | catfile(qw(OddTest Plugin -Dodgy.pm)) => 'OddTest::Plugin::-Dodgy', |
11 | catfile(qw(EditorJunk Plugin #Bar.pm#)) => 'EditorJunk::Bar', |
12 | catfile(qw(EditorJunk Plugin .#Bar.pm)) => 'EditorJunk::Bar', |
13 | ); |
14 | |
15 | my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV; |
16 | my @path = $core ? (File::Spec->updir, File::Spec->updir, File::Spec->updir, |
c21563cb |
17 | "t", "Module_Pluggable") : ($FindBin::Bin,"t"); |
183ac38d |
18 | |
c21563cb |
19 | my @files; |
a0df7637 |
20 | unless (grep { lc($^O) eq $_ } qw(vms vos)) { |
183ac38d |
21 | foreach my $test (keys %dodgy_files) { |
d884a504 |
22 | my ($file) = (catfile(@path, "lib", $test)=~/^(.*)$/); |
a0df7637 |
23 | if (open(FH, ">$file")) { |
183ac38d |
24 | my $name = $dodgy_files{$test}; |
a0df7637 |
25 | print FH "package $name;\nsub new {}\n1;"; |
26 | close(FH); |
c21563cb |
27 | push @files, $file; |
183ac38d |
28 | } |
29 | } |
30 | } |
848ff2a1 |
31 | |
c21563cb |
32 | |
848ff2a1 |
33 | WriteMakefile |
34 | ( |
c21563cb |
35 | 'NAME' => 'Module::Pluggable', |
848ff2a1 |
36 | 'VERSION_FROM' => 'lib/Module/Pluggable.pm', |
c21563cb |
37 | 'PREREQ_PM' => { |
848ff2a1 |
38 | 'File::Basename' => '0', |
39 | 'File::Spec' => '3.00', |
40 | 'Test::More' => '0.62' |
41 | }, |
c21563cb |
42 | 'EXE_FILES' => [], |
43 | 'INSTALLDIRS' => ($] >= 5.008009) ? "perl" : "site", |
44 | 'PL_FILES' => {}, |
45 | 'realclean' => {FILES=> join ' ', @files}, |
183ac38d |
46 | # In the core pods will be built by installman. |
47 | $core ? (MAN3PODS => {}) : (), |
848ff2a1 |
48 | ) |
49 | ; |