Advertisement
hakonhagland

install-perlbrew-macos

Sep 23rd, 2021
1,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.76 KB | None | 0 0
  1. # set the PERLBREW_ROOT environment variable
  2. $ export PERLBREW_ROOT=~/perl5/perlbrew
  3.  
  4. # Delete ~/perl5/perlbrew/ folder
  5.  
  6. $ rm -rf $PERLBREW_ROOT
  7.  
  8. # Install perlbrew:
  9.  
  10. $ \curl -L https://install.perlbrew.pl | bash
  11.  
  12. # Activate perlbrew:
  13.  
  14. $ source "$PERLBREW_ROOT/etc/bashrc"
  15. # install latest perl version:
  16.  
  17. $ perlbrew install perl-5.34.0
  18.  
  19. # install cpanm
  20.  
  21. $ perlbrew install-cpanm
  22.  
  23. # switch to the newly installed perl
  24.  
  25. $ perlbrew switch perl-5.34.0
  26.  
  27. # Check that it works:
  28.  
  29. $ perl --version
  30.  
  31. $ cpanm --version
  32.  
  33. # Make the new perl available in all shells by adding the following statements to the end of your ~/.zshrc file:
  34.  
  35. export PERLBREW_ROOT=~/perl5/perlbrew
  36. [[ -f "$PERLBREW_ROOT/etc/bashrc" ]] && source "$PERLBREW_ROOT/etc/bashrc"
  37.  
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement