The CPAN shell is just another shell, so why not drive it from Emacs?
If you write Perl code in Emacs, you may have wondered why we don’t have a simple mode for driving the CPAN shell (at least I couldn’t find one!).
Well, I finally stopped wondering. It wasn’t that hard to rip out the
sh-specific parts of
shell.el and make a new mode for the CPAN shell.
Here’s the code:
It’s easy to load up and drive from Emacs:
(add-to-list 'load-path (expand-file-name "/path/to/cpan-el/")) (setq cpan-file-name "cpan") (require 'cpan)
To run it, type
There aren’t too any bells and whistles yet (completion, etc.), but you it’s pretty small so feel free to hack away.