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

index e6b205e1746533b131f700def46b7e78b38e0f98..49f9a42e3b7a15744c0259a97db643579d6d229a 100644 (file)
@@ -4,6 +4,11 @@ use ExtUtils::MakeMaker;
 
 my $dist = 'Acme-CPANAuthors-You-re_using';
 
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'Acme::CPANAuthors'   => 0,
  'Carp'                => 0,
@@ -30,17 +35,17 @@ my %META = (
 );
 
 WriteMakefile(
-    NAME             => 'Acme::CPANAuthors::You::re_using',
+    NAME             => $name,
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/Acme/CPANAuthors/You/re_using.pm',
-    ABSTRACT_FROM    => 'lib/Acme/CPANAuthors/You/re_using.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/Acme/CPANAuthors/You/re_using.pm > $(DISTVNAME)/README',
+        PREOP    => "pod2text $file > \$(DISTVNAME)/README",
         COMPRESS => 'gzip -9f', SUFFIX => 'gz'
     },
     clean            => {