]> git.vpit.fr Git - perl/modules/indirect.git/blob - Makefile.PL
Test 'package A; sub foo; foo A->new' that gets deparsed as 'A->foo->new'
[perl/modules/indirect.git] / Makefile.PL
1 use 5.009004;
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          => 'indirect',
24     AUTHOR        => 'Vincent Pit <perl@profvince.com>',
25     LICENSE       => 'perl',
26     VERSION_FROM  => 'lib/indirect.pm',
27     ABSTRACT_FROM => 'lib/indirect.pm',
28     PL_FILES      => {},
29     PREREQ_PM     => {
30         'XSLoader' => 0,
31     },
32     dist          => {
33         PREOP      => 'pod2text lib/indirect.pm > $(DISTVNAME)/README; '
34                       . build_req,
35         COMPRESS   => 'gzip -9f', SUFFIX => 'gz'
36     },
37     clean         => { FILES => 'indirect-* *.gcov *.gcda *.gcno cover_db' },
38 );