summaryrefslogtreecommitdiff
path: root/plugins/perl/perl.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/perl/perl.plugin.zsh')
-rw-r--r--plugins/perl/perl.plugin.zsh9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/perl/perl.plugin.zsh b/plugins/perl/perl.plugin.zsh
index 678e88d97..137fa252a 100644
--- a/plugins/perl/perl.plugin.zsh
+++ b/plugins/perl/perl.plugin.zsh
@@ -54,3 +54,12 @@ pgs() { # [find] [replace] [filename]
prep() { # [pattern] [filename unless STDOUT]
perl -nle 'print if /'"$1"'/;' $2
}
+
+# If the 'perlbrew' function isn't defined, perlbrew isn't setup.
+if [[ $ZSH_PERLBREW_ACTIVATE != false ]] && (( ! $+functions[perlbrew] )); then
+ local _perlbrew="${PERLBREW_ROOT:-${HOME}/perl5/perlbrew}"
+ if [[ -f "${_perlbrew}/etc/bashrc" ]]; then
+ source "${_perlbrew}/etc/bashrc"
+ fi
+ unset _perlbrew
+fi