About this series: a collection of short, daily blog posts about lcpan tips/recipes. Some posts will also end up in the upcoming App::lcpan::Manual::Cookbook POD to be included in the App-lcpan distribution.

About lcpan: an application to download and index a mini CPAN mirror on your local filesystem, so in effect you will have something like your own CPAN with a command-line tool (or perl API) to query and extract information from your mirror. I find it perfect for my own personal use when working offline.

A CPAN distribution can contain scripts in addition to modules. Sometimes you only remember the name of the script but not the module/dist name, so there is a difficulty (read: an additional Google search) to install the script from CPAN because CPAN clients normally expect module/dist name. lcpan to the rescue: a script2mod (as well as script2dist, script2rel) is provided to find out the name of CPAN module for a known script. So you can install module with:

% cpanm -n `lcpan script2mod pm-uninstall` % cpanm -n `lcpan script2mod pmuninst`