<commit_before>#!/bin/bash

## These 3 lines are mandatory.
export PERLBREW_ROOT=$HOME/perl5/perlbrew
export PERLBREW_HOME=$HOME/.perlbrew
#echo source ${PERLBREW_ROOT}/etc/bashrc

unset MANPATH
source ${PERLBREW_ROOT}/etc/bashrc

#if [[ -z "$PERLBREW_BASHRD_VERSION" ]]
# then
#   echo "if branch taken"
#   source ~/perl5/perlbrew/etc/bashrc
#fi

#Switch to the right version and filter useless message. 

#Amanda server on 08.04 gives warning if we go directly to  perl-5.14.2@mediacloud 
perlbrew use perl-5.14.2  2> >(grep -v 'manpath: warning: $MANPATH set, ignoring /etc/manpath.config')
if [ $? -ne 0 ]; then
    echo "Unable to run 'perlbrew use perl-5.14.2'"
    exit 1
fi

perlbrew use perl-5.14.2@mediacloud   2> >(grep -v 'manpath: warning: $MANPATH set, ignoring /etc/manpath.config')
if [ $? -ne 0 ]; then
    echo "Unable to run 'perlbrew use perl-5.14.2@mediacloud'"
    exit 1
fi

# NOTE: We filter the useless MANPATH warning message this way because there was no good way to get rid of it.
# perlbrew use will fail unless $MANPATH is set but then it generates this warning.
<commit_msg>use Perl 5.18.1 (latest stable version as of Nov 15, 2013) instead of Perl 5.14.2 in set_perl_bre_environment.sh<commit_after>#!/bin/bash

## These 3 lines are mandatory.
export PERLBREW_ROOT=$HOME/perl5/perlbrew
export PERLBREW_HOME=$HOME/.perlbrew
#echo source ${PERLBREW_ROOT}/etc/bashrc

unset MANPATH
source ${PERLBREW_ROOT}/etc/bashrc

#if [[ -z "$PERLBREW_BASHRD_VERSION" ]]
# then
#   echo "if branch taken"
#   source ~/perl5/perlbrew/etc/bashrc
#fi

#Switch to the right version and filter useless message. 

#Amanda server on 08.04 gives warning if we go directly to  perl-5.18.1@mediacloud 
perlbrew use perl-5.18.1  2> >(grep -v 'manpath: warning: $MANPATH set, ignoring /etc/manpath.config')
if [ $? -ne 0 ]; then
    echo "Unable to run 'perlbrew use perl-5.18.1'"
    exit 1
fi

perlbrew use perl-5.18.1@mediacloud   2> >(grep -v 'manpath: warning: $MANPATH set, ignoring /etc/manpath.config')
if [ $? -ne 0 ]; then
    echo "Unable to run 'perlbrew use perl-5.18.1@mediacloud'"
    exit 1
fi

# NOTE: We filter the useless MANPATH warning message this way because there was no good way to get rid of it.
# perlbrew use will fail unless $MANPATH is set but then it generates this warning.

{'fraction_non_alphanumeric': 0.11163998269147556, 'fraction_numerical': 0.03461704889658156, 'mean_word_length': 3.8368200836820083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6628224', 'n_tokens_mistral': 909, 'n_tokens_neox': 825, 'n_words': 288}