]> git.vpit.fr Git - perl/modules/subs-auto.git/blob - Makefile.PL
Get rid of Debian_CPANTS.txt
[perl/modules/subs-auto.git] / Makefile.PL
1 use 5.010;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 my $BUILD_REQUIRES = {
8  'ExtUtils::MakeMaker' => 0,
9  'Test::More'          => 0,
10 };
11
12 sub build_req {
13  my $tometa = ' >> $(DISTVNAME)/META.yml;';
14  my $build_req = 'echo "build_requires:" ' . $tometa;
15  foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
16   my $ver = $BUILD_REQUIRES->{$mod};
17   $build_req .= sprintf 'echo "    %-30s %s" %s', "$mod:", $ver, $tometa;
18  }
19  return $build_req;
20 }
21
22 WriteMakefile(
23     NAME          => 'subs::auto',
24     AUTHOR        => 'Vincent Pit <perl@profvince.com>',
25     LICENSE       => 'perl',
26     VERSION_FROM  => 'lib/subs/auto.pm',
27     ABSTRACT_FROM => 'lib/subs/auto.pm',
28     PL_FILES      => {},
29     PREREQ_PM     => {
30         'Carp'            => 0,
31         'Symbol'          => 0,
32         'Variable::Magic' => 0.08
33     },
34     dist          => {
35         PREOP      => 'pod2text lib/subs/auto.pm > $(DISTVNAME)/README; '
36                       . build_req,
37         COMPRESS   => 'gzip -9f', SUFFIX => 'gz'
38     },
39     clean         => { FILES => 'subs-auto-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' }
40 );
41
42 1;
43
44 package MY;
45
46 sub postamble {
47  my $cv = join ' -coverage ', 'cover',
48                             qw/statement branch condition path subroutine time/;
49  <<POSTAMBLE;
50 cover test_cover:
51         $cv -test
52 POSTAMBLE
53 }