From: Vincent Pit Date: Sun, 4 Oct 2009 08:11:11 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v0.03~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FAcme-CPANAuthors-You-re_using.git;a=commitdiff_plain;h=874c48a14d61dbde5ab5b6fc170f2eb57342295f Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index e6b205e..49f9a42 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,6 +4,11 @@ use ExtUtils::MakeMaker; my $dist = 'Acme-CPANAuthors-You-re_using'; +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Acme::CPANAuthors' => 0, 'Carp' => 0, @@ -30,17 +35,17 @@ my %META = ( ); WriteMakefile( - NAME => 'Acme::CPANAuthors::You::re_using', + NAME => $name, AUTHOR => 'Vincent Pit ', LICENSE => 'perl', - VERSION_FROM => 'lib/Acme/CPANAuthors/You/re_using.pm', - ABSTRACT_FROM => 'lib/Acme/CPANAuthors/You/re_using.pm', + VERSION_FROM => $file, + ABSTRACT_FROM => $file, PL_FILES => {}, PREREQ_PM => \%PREREQ_PM, MIN_PERL_VERSION => 5.006, META_MERGE => \%META, dist => { - PREOP => 'pod2text lib/Acme/CPANAuthors/You/re_using.pm > $(DISTVNAME)/README', + PREOP => "pod2text $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, clean => {