1

Is there any instruction on installing Devel::Repl? I use cpan Devel::REPL command to have it installed but I cannot launch it using the re.pl command (as suggested https://metacpan.org/pod/Devel::REPL)

My cpan command comes from the perl v5.36 installed from homebrew. Is there something I have to do in order to be able to run re.pl? Like adding ~/.cpan to my system $PATH?enter image description here

3
  • If you install it under a perlbrew managed Perl then you can run only under that Perl -- so perlbrew use perl-version-with-it; and then use it ... is that what you are doing and then it fails? Commented Oct 9, 2022 at 21:02
  • On my mac it installs the re.pl into /opt/homebrew/Cellar/perl/5.34.0/bin. Can you check if you have the script in the corresponding directory for 5.36? Commented Oct 10, 2022 at 6:32
  • Is it recommended to install perl with perlbrew instead of homebrew directly? I have installed perl using brew install perl... I have included what I have in my perl bin folder Commented Oct 10, 2022 at 9:25

1 Answer 1

2

I used the cpan Devel::REPL command to have it installed but I cannot launch it using the re.pl command Is there something I have to do in order to be able to run re.pl ?

Yes, re.pl is installed in the bin directory of the perl installation directory. This directory is not automatically added to the search path by homebrew, so you need to add it manually. Add the following line to your ~/.zshrc file:

export PATH="/opt/homebrew/Cellar/perl/5.36.0/bin${PATH+:$PATH}"

then open a new terminal. You should now be able to type re.pl at the prompt to enter the REPL.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.