我對Module :: Build有點新,所以也許我做了錯誤的事情。當我將我的調度從「test」更改爲「testcover」時,我是唯一一個獲得警告的人嗎? Devel :: Cover中是否存在錯誤? Module :: Build中是否存在錯誤?我可能只是做了錯誤的事情。爲什麼Module :: Build的testcover會讓我「使用未初始化的值」警告?
我使用ActiveState Perl v5.10.0與Module :: Build版本0.31012和Devel :: Cover 0.64和Eclipse 3.4.1與EPIC 0.6.34爲我的IDE。
更新:我升級到Module :: Build 0.34,警告仍然輸出。
更新:看起來像B :: Deparse中的一個錯誤。希望有一天它會得到修復。
這裏是我的單元測試構建文件:
use strict;
use warnings;
use Module::Build;
my $build = Module::Build->resume (
properties => {
config_dir => '_build',
},
);
$build->dispatch('test');
當我運行這個單元測試構建文件,我得到下面的輸出:
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)
但是,當我改變派遣線「 testcover'我得到以下輸出,其中總是包含一堆「按位和使用未初始化的值」的警告消息:
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.
聽起來像它可能是`B :: Deparse`中的一個錯誤。 – 2009-07-31 17:47:23
我剛剛升級了B :: Deparse,並且警告移動到了不同的行號,但它指向與之前模塊相同的調用。 – 2009-08-01 00:33:12
我通過電子郵件發送了B :: Deparse的作者。我們必須看看會發生什麼。 – 2009-10-22 14:09:12