dot rc

Sign in or create your account | Project List | Help

dot rc Commit Details

Date:2010-08-17 09:48:06 (1 year 5 months ago)
Author:Luciano Rocha
Commit:75d0ead414403d747776937c9673b0a98ed9e446
Message:perldbg: allow specifying modules with .pm and what to import

Files: rc/bash_functions (1 diff)

Change Details

rc/bash_functions
548548
549549        e=()
550550        for m; do
551            if [[ "$m" =~ '^([[:alnum:]_)+(::[[:alnum:]_]+)*$' ]]; then
551            if [[ "$m" =~ '^([[:alnum:]_)+(::[[:alnum:]_]+)*( .*)?$' ]]; then
552552                if perl "-M$m" -e 1 &> /dev/null; then
553553                    aval[ ${#aval[@]} ]="$m"
554554                else
555555                    echo "skipping $m, unable to load it" >&2
556556                fi
557            elif [ -e "$m" ]; then
558                e[ ${#e[@]} ]="require '$m';"
557            elif [ -z "${m##*.pm}" ]; then
558                if [ -e "$m" ]; then
559                    e[ ${#e[@]} ]="require '$m';"
560                else
561                    echo "skipping $m, unable to find it" >&2
562                fi
559563            else
560564                e[ ${#e[@]} ]="$m;"
561565            fi

Archive Download the corresponding diff file

Branches:
master