]> git.vpit.fr Git - perl/modules/Bit-MorseSignals.git/commitdiff
Build the $name and the main $file from $dist
authorVincent Pit <vince@profvince.com>
Sun, 4 Oct 2009 08:19:06 +0000 (10:19 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 4 Oct 2009 08:19:06 +0000 (10:19 +0200)
Makefile.PL

index be9b1284cfefc6a57715e5d4363a2b43e704677f..19b52f4d2a653a25a2ea3f55c05af9aba0eafe40 100644 (file)
@@ -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 <perl@profvince.com>',
     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            => {