From: Karen Etheridge Date: Tue, 26 Mar 2013 04:53:33 +0000 (-0700) Subject: fix dist NAME, as per https://gist.github.com/miyagawa/5242916 X-Git-Tag: v0.001000~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5fb57e525d59d47ed30682fcf90903e6b5c69e09;p=p5sagit%2FDistar.git fix dist NAME, as per https://gist.github.com/miyagawa/5242916 --- diff --git a/bin/distar-init b/bin/distar-init index 41fc2f8..4771479 100755 --- a/bin/distar-init +++ b/bin/distar-init @@ -16,10 +16,12 @@ mkpath "${project}/maint"; mkpath join('/', $project, 'lib', @parts[0..$#parts-1]); +my $package_name = join('::', @parts); + open my $mpl_main, '>', "${project}/Makefile.PL" or die "couldn't open Makefile.PL: $!"; -print $mpl_main sprintf(<<'END', $project, $lib_file); +print $mpl_main sprintf(<<'END', $package_name, $lib_file); use strict; use warnings FATAL => 'all'; use ExtUtils::MakeMaker; @@ -53,8 +55,6 @@ close($mpl_maint); open my $pm, '>', "${project}/${lib_file}" or die "Couldn't open .pm file: $!"; -my $package_name = join('::', @parts); - my $year = 1900+(localtime)[5]; my $mod_text = sprintf(<<'END', $package_name, $package_name, $author, $year, $package_name);