From: Vincent Pit Date: Sun, 4 Oct 2009 08:40:14 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v0.03~5 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FThread-Cleanup.git;a=commitdiff_plain;h=b6ffd07fd28818afacfb3eac681ee1b938e1adfb Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index d54e1e0..087e0a4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 ', 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 => {