#!/bin/bash
+if [[ "${BASH_SOURCE[0]}" == "${0}" ]] ; then
+ echo "This script can not be executed standalone - it can only be source()d" 1>&2
+ exit 1
+fi
+
if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi
# we need a mirror that both has the standard index and a backpan version rolled
# FIXME work around https://github.com/perl11/cperl/issues/144
# (still affecting 5.22.3)
if is_cperl && ! [[ -f ~/perl5/perlbrew/perls/$BREWVER/bin/perl ]] ; then
- ln -s ~/perl5/perlbrew/perls/$BREWVER/bin/cperl ~/perl5/perlbrew/perls/$BREWVER/bin/perl
+ ln -s ~/perl5/perlbrew/perls/$BREWVER/bin/cperl ~/perl5/perlbrew/perls/$BREWVER/bin/perl || /bin/true
fi
# can not do 'perlbrew use' in the run_or_err subshell above, or a $()
# the perl is found (won't be there unless compilation suceeded, wich *ALSO* returns 0)
perlbrew use $BREWVER || /bin/true
- if [[ "$( perlbrew use | grep -oP '(?<=Currently using ).+' )" != "$BREWVER" ]] ; then
+ if \
+ ! [[ -x ~/perl5/perlbrew/perls/$BREWVER/bin/perl ]] \
+ || [[ "$( perlbrew use | grep -oP '(?<=Currently using ).+' )" != "$BREWVER" ]]
+ then
echo_err "Unable to switch to $BREWVER - compilation failed...?"
echo_err "$LASTOUT"
exit 1
fi
done
+ echo "POISON_ENV: setting PERL_UNICODE=SAD"
+ export PERL_UNICODE=SAD
+
### emulate a local::lib-like env