Hey, Philip, you wrote this a long time ago.

Now, I'm trying to get some coverage out of Devel::Cover on pkg_add,
and somehow, it gets in the way.

# perl -MDevel::Cover=+select,OpenBSD/.* /usr/sbin/pkg_add random_run

Selecting packages matching:
    OpenBSD/.*
Ignoring packages matching:
    /Devel/Cover[./]
Ignoring packages in:
    /usr/local/libdata/perl5/site_perl/amd64-openbsd
    /usr/local/libdata/perl5/site_perl
    /usr/libdata/perl5/amd64-openbsd
    /usr/libdata/perl5
Couldn't install random_run-2.15
Devel::Cover: getting BEGIN block coverage
Devel::Cover: 100% - 1s taken
Devel::Cover: getting CHECK block coverage
Devel::Cover: 100% - 0s taken
Devel::Cover: getting END/INIT block coverage
Devel::Cover: 100% - 0s taken
Devel::Cover: getting CV coverage
Devel::Cover: 9% Argument "*OpenBSD::MkTemp::_GEN_1" isn't numeric in addition 
(+) at /usr/local/libdata/perl5/site_perl/amd64-openbsd/Devel/Cover.pm line 852.
Devel::Cover: 49% Argument "*OpenBSD::MkTemp::_GEN_2" isn't numeric in scalar 
assignment at /usr/local/libdata/perl5/site_perl/amd64-openbsd/Devel/Cover.pm 
line 900.
Devel::Cover: 100% - 3s taken
Devel::Cover: Writing coverage database to 
/home/espie/bin/cover_db/runs/1688807352.41650.28355
Devel::Cover: Oops, it looks like something went wrong writing the coverage.
              It's possible that more bad things may happen but we'll try to
              carry on anyway as if nothing happened.  At a minimum you'll
              probably find that you are missing coverage.  If you're
              interested, the problem was:

Found type 9 GLOB(0x64a7292fc10), but it is not representable by the Sereal 
encoding format at 
/usr/local/libdata/perl5/site_perl/amd64-openbsd/Devel/Cover/DB/IO/Sereal.pm 
line 46.


I have zero idea if Devel::Cover is to blame or if OpenBSD::MkTemp is missing
some magic annotation to cover for _GEN_1, _GEN_2, but the end result is
that NO coverage data gets written, none at all (I suspect some missing
annotations, see below)

Which is of course slightly annoying.

I can tweak pkg_add to use File::Temp instead for coverage purposes, but
I'd rather not.

(note that using File::Temp, including +select,File/Temp.pm Devel::Cover works,
which would tend to lean towards the XS code being subtly incomplete)

Reply via email to