How To List Locally Installed Perl Modules

How To List Locally Installed Perl Modules

Perl developers often install modules from CPAN rather than by using the distributions' own packages (which, for some Perl modules, may not be available).

Should one ever need to reproduce the installed modules then a listing of what they are is vital.
Built into Perl, but not at all well known is a command to do exactly that. Here's an example of it in use, with user input in bold:

[amit@amitmaheshwari.in]$ instmodsh

Available commands are:
     l - List all installed modules
     m - Select a module
     q - Quit the program
cmd? l

Installed modules are:
     Array::Compare
     B::Hooks::EndOfScope
     Business::CreditCard
     Business::CreditCard::Object
     Business::PayPal::IPN
...
cmd? q
[amit@amitmaheshwari.in] $