I bet searching here on monks would have given you a few examples of how monks do this. There is a plethora of scripts available by now as there are many ways to answer the question.
I also wrote a script myself, but with a few additions to make it easier to find module not (yet) installed, so that I don't have to dig on CPAN when I'm looking for a module that does XML/XPM/CSV/mysql/...
Note that my script works based on the list of modules available as seen by CPAN, so it will not find modules that were manually copied into the perl tree.
$ modlist -?
usage: modlist [ -a AUT ] [ -r ] [ -i ] [ -nc ] [ <pattern> ]
-a | --author=AUTHOR_ID Only modules from author
-r | --registered Only registered modules
-i | --installed Only installed modules
-n | --new Only new modules
-c | --csv Output module and version as CSV
<pattern> Only modules that match pattern
$ modlist -i xpm
Module name Description
$ modlist -r peek
Module name Description
Apache::Peek Devel::Peek for mod_perl
Data::Peek A collection of low-level debug facilities
Devel::Peek Peek at internal representation of Perl data
Core since 5.006 1.00_01 in 5.010001
POE::API::Peek Peek into the internals of a running POE env
It also does colorizing (when available), shows if it is a CORE module (using Module::Corelist), since when and what version in core,
Enjoy, Have FUN! H.Merijn
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||