From: Vincent Pit Date: Sun, 4 Oct 2009 08:37:51 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v1.11~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=feaf2ede1be5dde7634742c2c0532b1b28d56361;p=perl%2Fmodules%2FTest-Valgrind.git Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index 5f7416f..be83192 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -43,6 +43,11 @@ if ($has_cc) { my $dist = 'Test-Valgrind'; +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Carp' => 0, 'Digest::MD5' => 0, @@ -88,18 +93,18 @@ my %META = ( ); WriteMakefile( - NAME => 'Test::Valgrind', + NAME => $name, AUTHOR => 'Vincent Pit ', LICENSE => 'perl', - VERSION_FROM => 'lib/Test/Valgrind.pm', - ABSTRACT_FROM => 'lib/Test/Valgrind.pm', + VERSION_FROM => $file, + ABSTRACT_FROM => $file, OPTIMIZE => '-g', C => \@C, PREREQ_PM => \%PREREQ_PM, MIN_PERL_VERSION => 5.006, META_MERGE => \%META, dist => { - PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README', + PREOP => "pod2text $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => {