[[ "${TRAVIS_PERL_VERSION}_" =~ '_thr_' ]] && BREWOPTS="$BREWOPTS -Duseithreads"
if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then
- perlbrew install --as $TRAVIS_PERL_VERSION --notest --noman --verbose $BREWOPTS -j 2 $BREWVER
+ echo "Building perl $TRAVIS_PERL_VERSION..."
+ PERLBUILD=$(perlbrew install --as $TRAVIS_PERL_VERSION --notest --noman --verbose $BREWOPTS -j 2 $BREWVER 2>&1)
perlbrew use $TRAVIS_PERL_VERSION
if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then
echo "Unable to switch to $TRAVIS_PERL_VERSION - compilation failed...?" 1>&2
+ echo "$PERLBUILD" 1>&2
exit 1
fi
fi