Fergal Daly wrote:
I was thinking of knocking together Test::AnnounceVersion.

use Test::AnnounceVersion qw(A::List Of::Modules);

which results in

# using version 1.5 of A::List
# using version 0.1 of Of::Modules

supplying no import args would make it output $VERSION from every package it
can find.

If you don't want to make it mandatory (in case it's not installed
somewhere) just do

use "Test::AnnounceVersion qw(A::List Of::Modules)";

Or something similar could be added to Test::More or Builder,

F

This is a functionality which would be applicable in more contexts than just automated testing. So I wouldn't be surprised if it has been modularized already, perhaps in the Module::* TLNS. I know I've seen one-liners that identify a module's version, but they involve too much typing* for the truly Lazy.


A month ago, I posed a question on perl.module-authors as to how to identify when a particular module became part of the Perl core distribution. Andy and others recommended Module::CoreList, and, in particular, cited the command-line utility, 'corelist', that accompanies it. So it would be nice to have something that could announce a module's version in any of (at least) three formats:

-- stand-alone module, probably in the Module::* TLNS;
-- command-line utility;
-- optional flag setting in Test::More and its siblings.

So my suggestions would be:

1. See what already exists on CPAN.
2. See how much of that could be developed in the 3-format way suggested above.
3. Code away!


jimk

*'too much typing' being typified by: having to reach for the shift key to type the capital 'M' when including a module, e.g. -MExtUtils::Install

Reply via email to