perldoc -l for modules without pod

perldoc -l Carton prints the path to Carton.pm so I can write

vim $(perldoc -l Carton)

if I want to open it in vim.

perldoc -l Carton::CLI print
No documentation found for "Carton::CLI".

even though there is a Carton::CLI module

wouldn't it be nice it also printed the path to the module, even if it did not have pod in it?

Alternatively, can you recommend another way to access the source code of an installed module?

4 Comments

mpath from Module::Path does the trick quite nicely. See also https://blogs.perl.org/users/neilb/2014/01/whats-your-tiny-tip.html

Have you tried perldoc -lm?

indeed I have a bash alias to "vim `perldoc -lm $*`" for convenient viewing and editing of installed code ;)

Leave a comment

About Gábor Szabó - גאבור סבו

user-pic I blog about Perl.