_Paul Johnson writes:_
In accordance with the terms of my grant from TPF this is the monthly report for my work on improving Devel::Cover covering March 2014.
Those of you who have been paying close attention may have noticed that it has been some months since my last report. Unfortunately I got rather busy and Devel::Cover work was one of the casualties. However, with the approval of my grant managers and the President of TPF I am intending to complete the grant.
This month saw the annual Perl QA Hackathon which was held in Lyon. You can find my report at
"http://blogs.perl.org/users/paul_johnson/2014/03/qa-hackathon-2014.html":http://blogs.perl.org/users/paul_johnson/2014/03/qa-hackathon-2014.html The hackathon gave me four days to really get back into working on Devel::Cover so I decided to restart my grant work directly afterwards.
Having discussed much about how to improve "cpancover.com":http://cpancover.com/latest/index.html with Olaf Alders, Neil Bowers and Barbie, I made a start on the implementation. There are a number of problems with the current implementation. The main difficulties are that there is no API for services such as metacpan or the CPAN dashboard to use, and that the coverage of CPAN is somewhat minimal. I have made a good start on solving these problems and making cpancover more useful.
I have also noted official support for 5.18.2 and prepared for the removal for CGI.pm from the core.
A bug in bleadperl (or not, as the case my be), "https://rt.perl.org/Public/Bug/Display.html?id=121317":https://rt.perl.org/Public/Bug/Display.html?id=121317 had me looking at Devel::Cover's database storage options. Devel::Cover can currently use JSON (either XS or pure perl) or Storable, in that order of preference. Yves Orton suggested that Sereal might by a sensible serialisation format, and so I wrote a Serial backend module.
The module performs well, being faster than JSON, and also having the advantage of having no other dependencies. Devel::Cover cannot be used on modules with it uses itself, but if the Sereal folk ever want to run Devel::Cover on Sereal they can use one of the other serialisation formats by setting the $DEVEL_COVER_IO_OPTIONS environment variable.
I've had a bug report about merging disparate coverage databases for a little while (github 71), and Tina Müller hit the same problem and mentioned it on IRC, so I thought it was time to look into it. It turns out that I was not correctly merging the structures of the databases - the parts which keep information about the statements and other constructs in the code. Adding tests for this took a little work, and gave me cause to improve Devel::Cover's testing system.
Because of the way in which Devel::Cover interacts with Perl, it is not always easy to test Devel::Cover in the way in which a more ordinary module might be tested. (Although that's not to say that I do all I can in that area and improvement here is more than warranted.) The majority of Devel::Cover is tested by having a number of small scripts which are run under Devel::Cover, and the output of the text report is compared against golden results. This is useful because it makes development against a problematic script simple.
Adding a new test case is also simple. It is a matter of adding the script and any dependencies into the tests directory and generating golden results. Once the golden results are generated, they should be checked manually for veracity, of course.
As usual, there were also some patches applied, pull requests merged, and other bugs fixed.
This month I released Devel::Cover version 1.09.
**Closed Github tickets:**
bq. 71 merge structures when merging dbs
75 Test failure with perl 5.19.6
76 perl 5.8 is also available at travis-ci
78 Deep recursion segfault with use overload...
**Merged pull requests:**
bq. 79 Execute get_magic once, and store the resulting value.
80 abranch_return_sub.t fail / bleadperl v5.19.5-368-ge45d898
81 added line to support spaces in path to dbname.
83 expand *all* tabs in source code
**Closed RT tickets:**
bq. #90591 abranch_return_sub.t fail on 5.19.6
**Fixed cpantesters reports:**
You can see the commits at "https://github.com/pjcj/Devel--Cover/commits/master":https://github.com/pjcj/Devel--Cover/commits/master
bq. 17.03 6:40
Total hours worked on grant: 334:55