From: Dan Brook Date: Sat, 1 May 2010 23:36:25 +0000 (+0100) Subject: Update bootstrapping for local::lib 1.006000. X-Git-Tag: 0.002002~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FGitalist.git;a=commitdiff_plain;h=9992168adc7bb4e49d25d6b46517e6f0694dbaf1 Update bootstrapping for local::lib 1.006000. As local::lib has stopped supporting the "--self-contained" flag the relevant code needed updating. Also added the JSON::XS dependency. --- diff --git a/Makefile.PL b/Makefile.PL index 7b519ec..065f22a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,5 @@ #!/usr/bin/env perl + use FindBin; BEGIN { do "$FindBin::Bin/script/env" or die $@ } @@ -95,6 +96,7 @@ requires 'File::Type::WebImages'; requires 'File::Which'; requires 'HTML::Entities'; requires 'IPC::Run'; +requires 'JSON::XS'; requires 'List::MoreUtils'; requires 'Path::Class' => '0.17'; requires 'Sub::Exporter'; diff --git a/script/bootstrap.pl b/script/bootstrap.pl index 1c302ce..269f899 100644 --- a/script/bootstrap.pl +++ b/script/bootstrap.pl @@ -46,11 +46,13 @@ lib->import("$target/lib/perl5"); local %CPAN::Config; require CPAN::HandleConfig; CPAN::HandleConfig->load(); -$CPAN::Config->{prefs_dir} = "~/.cpan/prefs"; +$CPAN::Config->{prefs_dir} = "$ENV{HOME}/.cpan/prefs"; force(qw/install local::lib/); +require lib::core::only; # Turn lib::core:only on require local::lib; # Turn local::lib on +lib::core::only->import(); local::lib->import( $target ); # Become fully self contained @@ -60,7 +62,8 @@ $ENV{PERL5LIB} = ""; # If we used a local::lib to bootstrap, this kills it. $ENV{PERL_AUTOINSTALL_PREFER_CPAN}=1; $ENV{PERL_MM_OPT} .= " INSTALLMAN1DIR=none INSTALLMAN3DIR=none"; -local::lib->import( '--self-contained', $target ); +lib::core::only->import(); +local::lib->import( $target ); # Force a re-install of local::lib here to get the dependencies for local::lib # It requires things which ensure we have an unfucked toolchain :) @@ -70,6 +73,8 @@ force(qw/install local::lib/); install('Module::Install'); install('YAML'); install('CPAN'); +# For some reason this isn't installed along with M::I::Catalyst. +install('File::Copy::Recursive'); install('Module::Install::Catalyst'); print "local::lib setup, type perl Makefile.PL && make installdeps to install dependencies"; diff --git a/script/env b/script/env index d7c7686..7f96991 100755 --- a/script/env +++ b/script/env @@ -63,8 +63,10 @@ if ( $on ) { $ENV{PERL_MM_OPT} .= " INSTALLMAN1DIR=none INSTALLMAN3DIR=none"; + require lib::core::only; require local::lib; - local::lib->import( '--self-contained', $target ); + lib::core::only->import(); + local::lib->import( $target ); } unless ( caller ) {