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

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