Setting the path to the interpreter in Emacs for Perl debugging with perldb
When I type M-x perldb to debug my Perl script, the debugging session fails, I think it is because I have a line at the beginning of my script that says:
The Emacs Perl debugger complains with:
Perl v5.10.0 required--this is only v5.8.6, at /path/to/file
I think it's loading an old Perl interpreter (the default one installed in my system). However, I have a much newer interpreter installed on a different path, so how can I tell perldb in Emacs the path to the interpreter that I want it to use?
In a version of perldb.el I see this code:
(defvar perldb-command-name "perl" "*Pathname of Perl interpreter.")
I'm sure if you either redefine the value of this variable, or if you set your PATH environment variable so that perl invokes the 5.10 version of perl, things will work for you.