develooper Front page | | Postings from June 2013

TPF Devel::Cover grant report May 2013

Thread Next
Paul Johnson
June 23, 2013 22:43
TPF Devel::Cover grant report May 2013
Message ID:
In accordance with the terms of my grant from TPF this is the monthly
report for my work on improving Devel::Cover covering May 2013.

In May Perl 5.18.0 was released.  5.18.0 introduced a new padrange operator
and I had failed to note the full implications for Devel::Cover.  So, a
couple of days after 5.18.0 was released I released Devel::Cover 1.03 which
works correctly with the new operator, and contains a new test to ensure it
stays that way.

A new major release of Perl also means that I was able to clean out all the
tests for 5.17.x, and start testing for 5.19.0.  I also updated
to use 5.18.0.

And speaking of cpancover, I put together the work which was done during the
QA Hackathon on perl5cover and got it up and running on
Perl5cover is the project to provide useful Perl and C level code coverage for
the Perl core.  There is a link at the bottom of the main page to where you can see the results.
There is still work to be done in this area.  In particular, some of the
results are lower than they should be.  I think there is a problem with
collecting coverage for modules which Devel::Cover itself uses.  This doesn't
usually show up because I am quite conservative in the CPAN modules I use, but
I haven't worried about the core modules.

There are also too many of the core tests failing under coverage.  This is not
surprising, and it's hopefully something which we will be able to improve on
in the future.  Jim Keenan is the driving force behind this work, much of
which is being built upon code from Abe Timmerman.

At the Satellite QA Hackathon in Tokyo, Kan Fushihara put together
Devel::Cover::Report::Coveralls.  If you haven't tried it out yet, you should
have a look.  In order to get the travis/coveralls integration correct he
needed some changes to the cover program, for which he sent me patches which
were applied this month.

To integrate coveralls into your CI process, register your project at, and add the following lines to .travis.yml (seasoned to taste):

      cpanm -n Devel::Cover::Report::Coveralls
      perl Makefile.PL && make && cover -test -report coveralls

I fixed a long-standing bug in pod coverage in which subroutines in different
packages but within the same file were not covered correctly.  This turned out
to be one of those bugs where all the effort was in the search, and the fix
was trivial.

And finally I started investigating speeding up Devel::Cover.  Devel::Cover
goes to some effort to have as minimal an overhead as possible.  One way it
does this is to try to collect coverage only about the files in which you are
interested.  But the checks to determine whether an op is in a file for which
coverage is being collected are also reasonably expensive.  There is scope for
improvement here.  In particular, the subroutine that does the ultimate check
is written in Perl.  Rewriting that in XS would be advantageous.  But reducing
the number of times the subroutine is called is also useful.  More about this
in June's report though.

Merged pull requests:

  61 fix return code (need shift)
  57 cover -test exit code is always success, when test fails

Closed RT tickets:

  #34888 Fix pod coverage for multiple packages in a file.

You can see the commits at

Hours worked:

  18.05   2:45
  20.05   3:30
  27.05   1:00
  30.05   2:30
  31.05   2:15

  Total  12:00

Total hours worked on grant: 269:35

Paul Johnson -

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About