From: Vincent Pit Date: Sun, 4 Oct 2009 08:33:23 +0000 (+0200) Subject: Build the $name and the main $file from $dist X-Git-Tag: v0.10~18 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=commitdiff_plain;h=a6570bb7d34ed373a0cd6ab8a36daa92e0a61b0f Build the $name and the main $file from $dist --- diff --git a/Makefile.PL b/Makefile.PL index 2619ce7..9534a4f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,6 +15,11 @@ if ($^O eq 'MSWin32' && $^V lt v5.9.0) { my $dist = 'Scope-Upper'; +(my $name = $dist) =~ s{-}{::}g; + +(my $file = $dist) =~ s{-}{/}g; +$file = "lib/$file.pm"; + my %PREREQ_PM = ( 'Exporter' => 0, 'XSLoader' => 0, @@ -40,18 +45,18 @@ my %META = ( ); WriteMakefile( - NAME => 'Scope::Upper', + NAME => $name, AUTHOR => 'Vincent Pit ', LICENSE => 'perl', - VERSION_FROM => 'lib/Scope/Upper.pm', - ABSTRACT_FROM => 'lib/Scope/Upper.pm', + VERSION_FROM => $file, + ABSTRACT_FROM => $file, PL_FILES => {}, @DEFINES, PREREQ_PM => \%PREREQ_PM, MIN_PERL_VERSION => 5.006, META_MERGE => \%META, dist => { - PREOP => 'pod2text lib/Scope/Upper.pm > $(DISTVNAME)/README', + PREOP => "pod2text $file > \$(DISTVNAME)/README", COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, clean => {