feat(perl): add perlbrew auto activation (#12814)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
jamesrtnzandCarlo Sala authored and GitHub committed 2025-01-23 20:24:43 +01:00
1 parent 501f29f90c
commit 9a0e22c184
2 files changed
+32 -17

No files matched your search

+9
View File
@@ -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