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

index 98961b34749862e97e1f2246510139f0f16dd6b6..f86b2549fba9d36f70c10f868f75b5681eef2a7d 100644 (file)
@@ -6,6 +6,11 @@ use ExtUtils::MakeMaker;
 
 my $dist = 'Sub-Prototype-Util';
 
 
 my $dist = 'Sub-Prototype-Util';
 
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'Carp'         => 0,
  'Exporter'     => 0,
 my %PREREQ_PM = (
  'Carp'         => 0,
  'Exporter'     => 0,
@@ -32,17 +37,17 @@ my %META = (
 );
 
 WriteMakefile(
 );
 
 WriteMakefile(
-    NAME             => 'Sub::Prototype::Util',
+    NAME             => $name,
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/Sub/Prototype/Util.pm',
-    ABSTRACT_FROM    => 'lib/Sub/Prototype/Util.pm',
+    VERSION_FROM     => $file,
+    ABSTRACT_FROM    => $file,
     PL_FILES         => {},
     PREREQ_PM        => \%PREREQ_PM,
     MIN_PERL_VERSION => 5.006,
     META_MERGE       => \%META,
     dist             => {
     PL_FILES         => {},
     PREREQ_PM        => \%PREREQ_PM,
     MIN_PERL_VERSION => 5.006,
     META_MERGE       => \%META,
     dist             => {
-        PREOP    => 'pod2text lib/Sub/Prototype/Util.pm > $(DISTVNAME)/README',
+        PREOP    => "pod2text $file > \$(DISTVNAME)/README",
         COMPRESS => 'gzip -9f', SUFFIX => 'gz'
     },
     clean            => {
         COMPRESS => 'gzip -9f', SUFFIX => 'gz'
     },
     clean            => {