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

index d54e1e08d1ff9dfd03ad7fad5c7799c8463c083a..087e0a4c69448611d1f07cfb8c5cdbbce213976c 100644 (file)
@@ -6,6 +6,11 @@ use ExtUtils::MakeMaker;
 
 my $dist = 'Thread-Cleanup';
 
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'XSLoader' => 0,
  'threads'  => '1.07',
@@ -31,17 +36,17 @@ my %META = (
 );
 
 WriteMakefile(
-    NAME             => 'Thread::Cleanup',
+    NAME             => $name,
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/Thread/Cleanup.pm',
-    ABSTRACT_FROM    => 'lib/Thread/Cleanup.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/Thread/Cleanup.pm > $(DISTVNAME)/README',
+        PREOP    => "pod2text $file > \$(DISTVNAME)/README",
         COMPRESS => 'gzip -9f', SUFFIX => 'gz'
     },
     clean            => {