move helpers location to inside lib
[p5sagit/Distar.git] / bin / distar-init
index 41fc2f8..d909e7c 100755 (executable)
@@ -16,15 +16,17 @@ 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;
 
-(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
+(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
 
 WriteMakefile(
   NAME => '%s',
@@ -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);
@@ -86,9 +86,9 @@ my $mod_text = sprintf(<<'END', $package_name, $package_name, $author, $year, $p
 
  Copyright (c) %s the %s L</AUTHOR> and L</CONTRIBUTORS>
  as listed above.
+
  =head1 LICENSE
+
  This library is free software and may be distributed under the same terms
  as perl itself.
 END