I have a Perl project (developed in Ubuntu 14.04) which cannot be built on perl 5.18.2, but it works on Perlbrew 5.22.0. I have tried to use M-x perldb in Emacs but it looks like Emacs calls Perl 5.18.2 by default. Is there a way to choose Perlbrew in Emacs for debugging?


You can customize the command run by perldb by changing gud-perldb-command-name. Its default value is set to "perl -d".

| improve this answer | |

These elisps may help you:

They seems to be pretty old, so please check them (I myself don't use perlbrew).

| improve this answer | |

The simplest way is probably to ensure the correct Perlbrew perl binary is used in the same way as usual for Perlbrew, and then launch Emacs in that environment.

Normally that would be something like

perlbrew switch X
perlbrew use X

See also: https://perlbrew.pl/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.