Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

BooK (2612)

BooK
  {book} {at} {cpan.org}
http://paris.mongueurs.net/
Yahoo! ID: philippe_bruhat (Add User, Send Message)

Obfuscation [plover.com]. Pink [axis-of-aevil.net]. HTTP::Proxy [cpan.org]. YEF [yapceurope.org]. Fishnet [perl.org]. Kapow [cpan.org]. Cog's [perl.org] bitch [cpan.org]. Invitation [perl.org]. White [perl.org] Camel [perl.org]. Nuff' said.

Journal of BooK (2612)

Tuesday July 27, 2004
06:54 AM

Versions of modules used in the test report

[ #20081 ]

I can't remeber in whose journal I read that, but I still remember a discussion about diag()ing the versions of the modules used during the tests, so that a FAIL is more useful.

I've come up with this:

use Test::More tests => 1;

for my $module ( qw(
    Test::More
    ...
) ) {
    eval "require $module;";
    diag $@ ? "$module not installed"
            : "$module version " . UNIVERSAL::VERSION($module);
}
ok(1, "Dummy test" );

Is there's already something like this somewhere? Is there's a better way?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.