Skip to content

Commit

Permalink
Install via MakeMaker (CPAN) happy
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Feb 20, 2010
1 parent 8bac2ec commit 303b84c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ blib
.*
!.gitignore
!.shipit
bin/cpanm
14 changes: 13 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{
print STDERR "Generating bin/cpanm\n";
open my $out, ">bin/cpanm" or die $!;
open my $in, "<cpanm" or die $!;
while (<$in>) {
s|^#!/usr/bin/env perl|#!perl|; # so MakeMaker can fix it
print $out $_
}
close $out;
}

use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'App::cpanminus',
Expand All @@ -7,5 +18,6 @@ WriteMakefile(
'LWP' => 0,
'Module::Build' => 0,
},
EXE_FILES => [ 'cpanm' ],
EXE_FILES => [ 'bin/cpanm' ],
clean => { FILES => 'bin/cpanm' },
);
Empty file added bin/.placeholder
Empty file.
2 changes: 1 addition & 1 deletion cpanm
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ Its catch? Deps-free, zero-conf, standalone ~200 LOC script
cd ~/bin
wget http://bit.ly/cpanm
chmod +x cpanm
# edit shebang if your perl is not /usr/bin/perl
# edit shebang if you don't have /usr/bin/env
=head1 DEPENDENCIES
Expand Down

0 comments on commit 303b84c

Please sign in to comment.