Sam Villain suggested I try Devel::Cover instead of the homegrown test
coverage library I'm currently using for POE. I was skeptical, having
seen it fail pretty badly in the past, but I gave it a shot.
Devel::Cover 0.34 (Perl 5.8.2, singlethreaded) works much better than in
the past.
It still introduces test failures, however. I used a modified version
of the recommended "make test" commands:
/usr/local/perl-582/bin/cover -delete
HARNESS_PERL_SWITCHES=-MDevel::Cover make test
/usr/local/perl-582/bin/cover
I suspect that the errors are caused by C<use>ing modules from string
eval(). I'm doing that to test the presence of modules so I can skip
some tests.
The first error:
t/06_tk....................ok 1/11Subroutine Tk::Widget::IsLabel
redefined at /usr/local/perl-582/i386-freebsd/Tk/Widget.pm line 250.
Failed to AUTOLOAD 'Tk::Widget::Tk_cmd' at t/06_tk.t line 128
XS_Tk__Callback_Call error:Can't use an undefined value as a SCALAR
reference at t/06_tk.t line 258.
(in cleanup) Can't use an undefined value as filehandle
reference at /usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86
during global destruction.
(in cleanup) Bad filehandle: 1 at
/usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86 during global
destruction.
t/06_tk....................dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-11
Failed 10/11 tests, 9.09% okay
The second message really isn't an error. Devel::Cover can't find
Storable even though Perl could. This really seems to point to string
eval being the culprit.
t/17_filter_ref............ok 89/89Devel::Cover: Can't find file
"blib/lib/Storable.pm": ignored.
And the third is just wacky:
t/31_gtk2..................Assertion ((PL_compcv)->sv_flags & 0xff) ==
SVt_PVCV failed: file "toke.c", line 7681 at
/usr/local/perl-582/i386-freebsd/B.pm line 231.
CHECK failed--call queue aborted at t/31_gtk2.t line 30.
Bad hash at /usr/local/perl-582/i386-freebsd/Devel/Cover.pm line 360.
END failed--call queue aborted at t/31_gtk2.t line 30.
t/31_gtk2..................dubious
Test returned status 2 (wstat 512, 0x200)
--
Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/