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.
One thing I’d like to keep an eye on whenever I update my CPAN mirror is whether there are new distributions that declare dependencies on one of my modules (new dependants), or whether a distribution no longer depends on my modules. Or, whether someone now mentions one of my modules/scripts (new mentions), or whether someone no longer mentions them.
I plan to add some sort of hook mechanism to lcpan, so that after
lcpan update is run, the above things can be performed. But, until that feature is implemented, I’m using a wrapper script like this.
When the script is run:
% lcpan-update-and-diff-rdeps-and-mentions PERLANCAR
then your CPAN mirror is updated with
lcpan update, and after that a diff output (or nothing, if nothing changes) will be shown detailing new/changed dependants and mentions for modules/scripts by author PERLANCAR.