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

index 677bb22b9a5baf17791c4603430c34fd09f9d2a9..519bbbf0277deb780fbc65d016449d7f37b3b6b1 100644 (file)
@@ -22,6 +22,11 @@ for (qw/USR1 USR2/) {
 
 my $dist = 'IPC-MorseSignals';
 
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'Bit::MorseSignals' => 0.05,
  'Carp'              => 0,
@@ -55,17 +60,17 @@ my %META = (
 );
 
 WriteMakefile(
-    NAME             => 'IPC::MorseSignals',
+    NAME             => $name,
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/IPC/MorseSignals.pm',
-    ABSTRACT_FROM    => 'lib/IPC/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/IPC/MorseSignals.pm > $(DISTVNAME)/README',
+        PREOP    => "pod2text $file > \$(DISTVNAME)/README",
         COMPRESS => 'gzip -9f', SUFFIX => 'gz',
     },
     clean            => {