GCOV2PERL(1)
π GCOV2PERL(1) β the glow-up
okay so this is gcov2perl, and it lives in the "User Contributed Perl Documentation" section of your manpages (iykyk, that's where all the good stuff hides) β¨
π NAME
gcov2perl β bestie, it converts gcov files into Devel::Cover databases. that's literally the whole job and it does it slayfully π
πΈ VERSION
version 1.50 β she's serving 1.50, no cap π«Ά
β SYNOPSIS
gcov2perl -h -i -v -db database gcov_files
π¦ DESCRIPTION
Convert gcov files to Devel::Cover databases. that's it, that's the vibe π
β¨ OPTIONS β¨
here's every flag she supports, and yes you need to know all of them, don't skip π
-db databaseβ picks which database you're gonna use, like choosing your main character database π-h,-helpβ shows you the help, a little "hey bestie here's what I do" π«Ά-i,-infoβ shows the documentation, aka the full lore drop π-v,-versionβ shows the version, for when you gotta know exactly which girl you're dealing with β
π₯ DETAILS
okay so here's the tea on getting coverage out of XS files β you literally cannot skip the first step, they have to be compiled with the right options first, periodt π
in a standard Makefile environment, like the one ExtUtils::MakeMaker creates, you can pull this off with:
HARNESS_PERL_SWITCHES=-MDevel::Cover make test \
CCFLAGS=-O0\ -fprofile-arcs\ -ftest-coverage \
OTHERLDFLAGS=-fprofile-arcs\ -ftest-coverage
ngl if you've already built your object files, it might be necessary to runmake cleanfirst π§Ή β or find some other way to make sure they actually get rebuilt with the optionsgcovrequires. no shortcuts bestie π
so now the code coverage data has been collected, and that means gcov needs to be run:
gcov Mylib.xs
this will create one or more gcov files, and those are exactly what you run gcov2perl on:
gcov2perl Mylib.xs.gcov
and finally, cover should be run as usual with whatever options you need:
cover
and if you're running everything with standard options, you can do all of this with one single command, iconic behavior honestly π
cover -test
π EXIT STATUS
the following exit values are returned:
0β all files converted successfully, we ate and left no crumbs π>0β an error occurred. not the vibe. π
π SEE ALSO
Devel::Coverβ go read it, she's the icon this whole thing feeds into π
π BUGS
Huh?
(no fr that's what it says, that's the whole bug section, and honestly? relatable.)
π LICENCE
Copyright 2001-2025, Paul Johnson (paul@pjcj.net)
This software is free. It is licensed under the same terms as Perl itself.
The latest version of this software should be available from my homepage: https://pjcj.net
and that's the whole page bestie!! this one shipped with perl v5.42.0 and was dated 2025-06-11 β go forth and get that coverage πΈππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Devel-Cover 1.500.0-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Devel-Cover 1.500.0-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Devel-Cover 1.500.0-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Devel-Cover 1.500.0-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms