Commit | Line | Data |
c440907b |
1 | # A template for Makefile.PL. |
2 | # - Set the $PACKAGE variable to the name of your module. |
3 | # - Set $LAST_API_CHANGE to reflect the last version you changed the API |
4 | # of your module. |
5 | # - Fill in your dependencies in PREREQ_PM |
6 | # Alternatively, you can say the hell with this and use h2xs. |
7 | |
8 | use ExtUtils::MakeMaker; |
9 | eval 'use ExtUtils::MakeMaker::Coverage'; |
10 | |
11 | $PACKAGE = 'XSLoader'; |
12 | ($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g; |
13 | $LAST_API_CHANGE = 0; |
14 | |
15 | eval "require $PACKAGE"; |
16 | |
17 | unless ($@) { # Make sure we did find the module. |
18 | print <<"CHANGE_WARN" if ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE; |
19 | |
20 | NOTE: There have been API changes between this version and any older |
21 | than version $LAST_API_CHANGE! Please read the Changes file if you |
22 | are upgrading from a version older than $LAST_API_CHANGE. |
23 | |
24 | CHANGE_WARN |
25 | } |
26 | |
27 | # In case the empty lib/ directory was not created. |
28 | mkdir 'lib', 0755 unless $ENV{PERL_CORE}; |
29 | |
30 | WriteMakefile( |
31 | NAME => $PACKAGE, |
32 | LICENSE => 'perl', |
33 | AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>', |
34 | VERSION_FROM => 'XSLoader_pm.PL', |
35 | ABSTRACT_FROM => 'XSLoader_pm.PL', |
36 | INSTALLDIRS => 'perl', |
37 | PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' }, |
38 | PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' }, |
39 | PREREQ_PM => { |
40 | 'Test::More' => '0.62', |
41 | }, |
42 | dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, |
43 | clean => { FILES => 'XSLoader-*' }, |
44 | ); |
45 | |
46 | # Unlink the .pm file included with the distribution |
47 | 1 while unlink "XSLoader.pm"; |
48 | |
49 | { |
50 | package MY; |
51 | |
52 | sub test_via_harness { |
53 | my($self, $orig_perl, $tests) = @_; |
54 | |
55 | my @perls = ($orig_perl); |
56 | push @perls, qw(bleadperl |
57 | perl5.6.1 |
58 | perl5.6.0 |
59 | perl5.005_03 |
60 | perl5.004_05 |
61 | perl5.004_04 |
62 | perl5.004) |
63 | if $ENV{PERL_TEST_ALL}; |
64 | |
65 | my $out; |
66 | foreach my $perl (@perls) { |
67 | $out .= $self->SUPER::test_via_harness($perl, $tests); |
68 | } |
69 | |
70 | return $out; |
71 | } |
72 | } |