From: Peter Rabbitson Date: Thu, 18 Feb 2016 04:46:00 +0000 (+0100) Subject: (travis) Fix INC-poison thinko from 6d74b82cc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23f25dde722f3fd081b479f5c32b85cb57c7328a;p=dbsrgits%2FDBIx-Class.git (travis) Fix INC-poison thinko from 6d74b82cc Ensure stable DBIC is in fact in INC by test time ( detected courtesy of the @INC-state reporter in t/00describe_environment.t \o/ ) --- diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash index 2d6fbf2..515b176 100755 --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -111,12 +111,16 @@ if [[ "$POISON_ENV" = "true" ]] ; then fi done - # emulate a local::lib-like env + +### emulate a local::lib-like env # trick cpanm into executing true as shell - we just need the find+unpack run_or_err "Downloading latest stable DBIC from CPAN" \ "SHELL=/bin/true cpanm --look DBIx::Class" - export PERL5LIB="$( ls -d ~/.cpanm/latest-build/DBIx-Class-*/lib | tail -n1 ):$PERL5LIB" + # move it somewhere as following cpanm will clobber it + run_or_err "Moving latest stable DBIC from CPAN to /tmp" "mv ~/.cpanm/latest-build/DBIx-Class-*/lib /tmp/stable_dbic_lib" + + export PERL5LIB="/tmp/stable_dbic_lib:$PERL5LIB" # perldoc -l searches $(pwd)/lib in addition to PERL5LIB etc, hence the cd / echo_err "Latest stable DBIC (without deps) locatable via \$PERL5LIB at $(cd / && perldoc -l DBIx::Class)"