1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
use ExtUtils::MakeMaker;
use Config;
my $pkg = 'NetAddr::IP::Lite';
$pkg =~ /[^:]+$/;
my $module = $& .'.pm';
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
my %makeparms = (
'NAME' => $pkg,
'VERSION_FROM' => $module, # finds $VERSION
'PREREQ_PM' => {Test::More => 0,
},
'clean' => { FILES => "*~ tmp* META.yml"},
'dist' => {COMPRESS=>'gzip', SUFFIX=>'gz'}
);
#sub MY::top_targets {
# package MY;
# my $inherited = shift->SUPER::top_targets(@_);
# $inherited =~ s/(pure_all\s+::.+)/$1 README/;
# $inherited;
#}
#sub MY::post_constants {
# my $post_constants = $Config{scriptdirexp} .'/pod2text';
# if (-e $post_constants) {
# $post_constants = q|
#MY_POD2TEXT = |. $post_constants .q|
#|;
# } else {
# $post_constants = q|
#MY_POD2TEXT = echo "perl distro missing 'pod2text' to convert " |;
# }
#}
#sub MY::postamble {
# package MY;
# my $postamble = q|
#README : |. $module .q|
# @$(MY_POD2TEXT) |. $module .q| > README
#
#|;
#}
WriteMakefile(%makeparms);
|