Raku / App-Rakubrew

Raku environment manager
https://rakubrew.org/
Other
26 stars 13 forks source link

[doc] The Rakubrew cpanm non-root user installation process could be better documented #74

Open jeffgazso opened 1 year ago

jeffgazso commented 1 year ago

I installed Rakubrew via $ cpanm App::Rakubrew as a non-root user. Unfortunately, the process was a bit bumpier than the CPAN section of the https://rakubrew.org/ site suggests. There were two bumps in the road:

  1. Rakubrew was installed to $HOME/perl5/bin/rakubrew and it wasn't initially in my path so I couldn't run $ rakubrew unqualified.
  2. Once that was fixed, Rakubrew complained Can't locate App/Rakubrew.pm in @INC.

The solution to the first issue was pretty obvious but the second issue took some time to figure out. If there is a better way to handle this let me know, but I was able to fix both issues by throwing the following in my .bashrc file:

export PATH="$HOME/perl5/bin/:$PATH"
if [ -d $HOME/perl5/lib/perl5 ]; then
    PERL5LIB=${PERL5LIB:+$PERL5LIB:}$HOME/perl5/lib/perl5
    MANPATH=${MANPATH:+$MANPATH:}$HOME/perl5/man
    export MANPATH PERL5LIB
fi

You may want to call this out in the documentation somewhere.