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 8use ExtUtils::MakeMaker; 9eval 'use ExtUtils::MakeMaker::Coverage'; 10 11$PACKAGE = 'XSLoader'; 12($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g; 13$LAST_API_CHANGE = 0; 14 15eval "require $PACKAGE"; 16 17unless ($@) { # Make sure we did find the module. 18 print <<"CHANGE_WARN" if ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE; 19 20NOTE: There have been API changes between this version and any older 21than version $LAST_API_CHANGE! Please read the Changes file if you 22are upgrading from a version older than $LAST_API_CHANGE. 23 24CHANGE_WARN 25} 26 27# In case the empty lib/ directory was not created. 28mkdir 'lib', 0755 unless $ENV{PERL_CORE}; 29 30# starting with Perl 5.11, "site" and "vendor" directories finally are 31# before "perl" (core) in @INC, thus allowing dual-life modules to be 32# updated without the need to overwrite the old version 33my $installdirs = $] < 5.011 ? "perl" : "site"; 34 35WriteMakefile( 36 NAME => $PACKAGE, 37 LICENSE => 'perl', 38 AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>', 39 VERSION_FROM => 'XSLoader_pm.PL', 40 ABSTRACT_FROM => 'XSLoader_pm.PL', 41 INSTALLDIRS => $installdirs, 42 PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' }, 43 PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' }, 44 PREREQ_PM => { 45 'Test::More' => '0.47', 46 }, 47 META_MERGE => { 48 resources => { 49 repository => 'git://perl5.git.perl.org/perl.git', 50 license => 'http://dev.perl.org/licenses/', 51 homepage => 'https://metacpan.org/module/Math::BigInt', 52 irc => 'irc://irc.perl.org/#p5p', 53 mailinglist => 'http://lists.perl.org/list/perl5-porters.html', 54 bugtracker => "https://rt.perl.org/rt3/Search/Results.html?Query=Queue='perl5' AND Content LIKE 'module=XSLoader' AND (Status='open' OR Status='new' OR Status='stalled')", 55 }, 56 }, 57 dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, 58 clean => { FILES => 'XSLoader-* XSLoader.pm' }, 59); 60 61# Unlink the .pm file included with the distribution 621 while unlink "XSLoader.pm"; 63 64{ 65 package MY; 66 67 sub test_via_harness { 68 my($self, $orig_perl, $tests) = @_; 69 70 my @perls = ($orig_perl); 71 push @perls, qw(bleadperl 72 perl5.6.1 73 perl5.6.0 74 perl5.005_03 75 perl5.004_05 76 perl5.004_04 77 perl5.004) 78 if $ENV{PERL_TEST_ALL}; 79 80 my $out; 81 foreach my $perl (@perls) { 82 $out .= $self->SUPER::test_via_harness($perl, $tests); 83 } 84 85 return $out; 86 } 87} 88