r/perl•
oddnos

Perlbrew compatibility with ksh on Openbsd.

Hi all, I am running OpenBSD 7.0 and am trying to install and use Perlbrew,

However the bashrc file is incompatible with the ksh shell. Adding it to my .profile gives me an error of:

ksh: /home/adam/perl5/perlbrew/etc/bashrc[18]: syntax error: `< ' unexpected

Due to to this (and specifically line 18) in the bashrc:

16 __perlbrew_purify () {
17     local path patharray 
18     IFS=: read -r${BASH_VERSION+a}${ZSH_VERSION+A} patharray <<< "$1"
19     for path in "${patharray[@]}" ; do
20         case "$path" in
21             (*"$PERLBREW_HOME"*) ;;
22             (*"$PERLBREW_ROOT"*) ;;
23             (*) printf '%s' "$outsep$path" ; outsep=: ;;
24         esac
25     done
26 }

Has anyone had any success getting Perlbrew working with ksh? Or does anyone know how I could modify the bashrc to be compatible?

Any help is greatly appreciated!

Posted Dec 11, 2021, 10:06 AM UTC

139
Loading comments…