Archive for March, 2011

Module::Info – why didn’t I look for this eariler?

March 15, 2011 4 comments

Just a quick post in praise of Module::Info. I often find myself wanting to know the version or location of a CPAN module installed on a particular system. Too often, I end up doing:

perl -MSome::Module -le "print $Some::Module::VERSION"


perl -MSome::Module -le "print $INC{'Some/'}"

Quite cumbersome and verbose. I’ve often thought someone could easily write a script to provide this, and even wondered if I should do this myself. The urge to scratch that itch has never become overpowering enough, however.

Today, though, I decided I should actually see if someone had already done it. It took all of 2 seconds to turn up Module::Info, which comes with a command line tool. I can now write the above commands as:

module_info Some::Module

It even tells me if it’s a core module, and can display its dependencies with the right command line parameters. Even better, there are packages for Debian and Ubuntu. What more could I ask for?

So Module::Info++, and now I have to start wondering why I didn’t take the time to look for this tool some time ago…

Categories: Perl Tags: