From: Vincent Pit Date: Sun, 4 Oct 2009 08:30:49 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v1.04~8 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d32fd1a163b586e0d1e562cc357c3db24545425c;p=perl%2Fmodules%2FRegexp-Wildcards.git Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index a464e2f..0fd8470 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,6 +4,11 @@ use ExtUtils::MakeMaker; my $dist = 'Regexp-Wildcards'; +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Carp' => 0, 'Text::Balanced' => 0, @@ -28,17 +33,17 @@ my %META = ( ); WriteMakefile( - NAME => 'Regexp::Wildcards', + NAME => $name, AUTHOR => 'Vincent Pit ', LICENSE => 'perl', - VERSION_FROM => 'lib/Regexp/Wildcards.pm', - ABSTRACT_FROM => 'lib/Regexp/Wildcards.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/Regexp/Wildcards.pm > $(DISTVNAME)/README', + PREOP => "pod2text $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, clean => {