1
0
Fork 0

Clean up perlbrew logic and allow for proper expansion

pull/556/head
Patrick Baker 11 years ago
parent bf0c5a70a4
commit 43890f70ad

@ -3,18 +3,27 @@
# #
# Authors: # Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# Patrick Baker <patricksbaker@gmail.com>
# #
# Return if requirements are not found. #
if (( ! $+commands[perl] )); then # Perlbrew
return 1 #
zstyle -s ':prezto:module:perl:perlbrew' location '_perlbrew_root'
_perlbrew_root_expanded=${(j::)~_perlbrew_root}
if [[ -s "${_perlbrew_root}/etc/bashrc" ]]; then
export PERLBREW_ROOT="${_perlbrew_root}"
source "${_perlbrew_root}/etc/bashrc"
unset _perlbrew_root
unset _perlbrew_root_expanded
fi fi
# #
# Local Module Installation # Local Module Installation
# #
if [[ "$OSTYPE" == darwin* ]] && (( $+commands[perl] )); then
if [[ "$OSTYPE" == darwin* ]]; then
# Perl is slow; cache its output. # Perl is slow; cache its output.
cache_file="${0:h}/cache.zsh" cache_file="${0:h}/cache.zsh"
perl_path="$HOME/Library/Perl/5.12" perl_path="$HOME/Library/Perl/5.12"
@ -29,13 +38,6 @@ if [[ "$OSTYPE" == darwin* ]]; then
unset perl_path unset perl_path
unset cache_file unset cache_file
# Perlbrew
zstyle -s ':prezto:module:perl:perlbrew' location '_perlbrew_root'
if [[ -s "${_perlbrew_root}/etc/bashrc" ]]; then
export PERLBREW_ROOT="${_perlbrew_root}"
source "${_perlbrew_root}/etc/bashrc"
fi
fi fi
# #

Loading…
Cancel
Save