From: Vincent Pit Date: Sun, 4 Oct 2009 08:19:06 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v0.07~10 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FBit-MorseSignals.git;a=commitdiff_plain;h=8dc3fa903caaa60b799fa4bfd0e484de822f5617 Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index be9b128..19b52f4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,6 +4,11 @@ use ExtUtils::MakeMaker; my $dist = 'Bit-MorseSignals'; +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Carp' => 0, 'Encode' => 0, @@ -32,17 +37,17 @@ my %META = ( ); WriteMakefile( - NAME => 'Bit::MorseSignals', + NAME => $name, AUTHOR => 'Vincent Pit ', LICENSE => 'perl', - VERSION_FROM => 'lib/Bit/MorseSignals.pm', - ABSTRACT_FROM => 'lib/Bit/MorseSignals.pm', + VERSION_FROM => $file, + ABSTRACT_FROM => $file, PL_FILES => {}, PREREQ_PM => \%PREREQ_PM, MIN_PERL_VERSION => 5.008, META_MERGE => \%META, dist => { - PREOP => 'pod2text lib/Bit/MorseSignals.pm > $(DISTVNAME)/README', + PREOP => "pod2text $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, clean => {