Search code examples
perlcpan

Perl Devel::REPL re.pl command not found


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


Solution

  • 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.