Why does Module::Build's testcover gives me "use of uninitialized value" warnings?
Posted
by Kurt W. Leucht
on Stack Overflow
See other posts from Stack Overflow
or by Kurt W. Leucht
Published on 2009-07-31T17:23:57Z
Indexed on
2010/03/24
21:33 UTC
Read the original article
Hit count: 285
I'm kinda new to Module::Build, so maybe I did something wrong. Am I the only one who gets warnings when I change my dispatch from "test" to "testcover"? Is there a bug in Devel::Cover? Is there a bug in Module::Build? I probably just did something wrong.
I'm using ActiveState Perl v5.10.0 with Module::Build version 0.31012 and Devel::Cover 0.64 and Eclipse 3.4.1 with EPIC 0.6.34 for my IDE.
UPDATE: I upgraded to Module::Build 0.34 and the warnings are still output.
*UPDATE: Looks like a bug in B::Deparse. Hope it gets fixed someday.*
Here's my unit test build file:
use strict;
use warnings;
use Module::Build;
my $build = Module::Build->resume (
properties => {
config_dir => '_build',
},
);
$build->dispatch('test');
When I run this unit test build file, I get the following output:
t\MyLib1.......ok
t\MyLib2.......ok
t\MyLib3.......ok
All tests successful.
Files=3, Tests=24, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
But when I change the dispatch line to 'testcover' I get the following output which always includes a bunch of "use of uninitialized value in bitwise and" warning messages:
Deleting database D:/Documents and Settings/<username>/My Documents/<SNIP>/cover_db
t\MyLib1.......ok
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
t\MyLib2.......ok
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
t\MyLib3.......ok
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
Use of uninitialized value in bitwise and (&) at D:/Perl/lib/B/Deparse.pm line 4252.
All tests successful.
Files=3, Tests=24, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Reading database from D:/Documents and Settings/<username>/My Documents/<SNIP>/cover_db
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
.../lib/ActivePerl/Config.pm 0.0 0.0 0.0 0.0 0.0 n/a 0.0
...l/lib/ActiveState/Path.pm 0.0 0.0 0.0 0.0 100.0 n/a 4.8
<SNIP>
blib/lib/<SNIP>/MyLib2.pm 100.0 90.0 n/a 100.0 100.0 0.0 98.5
blib/lib/<SNIP>/MyLib3.pm 100.0 90.9 100.0 100.0 100.0 0.6 98.0
Total 14.4 6.7 3.8 18.3 20.0 100.0 11.6
---------------------------- ------ ------ ------ ------ ------ ------ ------
Writing HTML output to D:/Documents and Settings/<username>/My Documents/<SNIP>/cover_db/coverage.html ...
done.
© Stack Overflow or respective owner