CPAN::Testers::ParseReport - parse reports to from various sources


The documentation in here is normally not needed because the code is meant to be run from the standalone program ctgetreports.

  ctgetreports --q mod:Moose Devel-Events


This is the core module for CPAN::Testers::ParseReport. If you're not looking to extend or alter the behaviour of this module, you probably want to look at ctgetreports instead.


Options are described in the ctgetreports manpage and are passed through to the functions unaltered.



reads the cpantesters JSON file or the local database for the distro and loops through the reports for the specified or most recent version of that distro found in these data.

parse_distro() intentionally has no meaningful return value, different options would require different ones.

$extract = parse_single_report($report,$dumpvars,%options)

mirrors and reads this report. $report is of the form

  { id => <integer>, guid => <guid>, }

$dumpvar is a hashreference that gets filled with data.

$extract is the result of parse_report() described below.

$bool = _looks_like_qp($raw_report)

We had to acknowledge the fact that some MTAs swallow the MIME-Version header while passing MIME through. So we introduce fallback heuristics that try to determine if a report is written in quoted printable.

Note that this subroutine is internal, just documented to have the internals documented.

The current implementation counts the number of QP escaped spaces and equal signs.

$extract = parse_report($target,$dumpvars,%Opt)

Reads one report. $target is the local filename to read (but see below for option 'article'). $dumpvars is a hashref which gets filled with descriptive stats about PASS/FAIL/etc. %Opt are the options as described in the ctgetreports manpage. $extract is a hashref containing the found variables.

Note: this parsing is a bit dirty but as it seems good enough I'm not inclined to change it. We parse HTML with regexps only, not an HTML parser. Only the entities are decoded.

In %Opt you can use

    article => $some_full_article_as_scalar

to use this function to parse one full article as text. When this is given, the argument $target is not read, but its basename is taken to be the id of the article. (OMG, hackers!)


Feeds a couple of potentially interesting data to Statistics::Regression and sorts the result by R^2 descending. Do not confuse this with a prove, rather take it as a useful hint. It can save you minutes of staring at data and provide a quick overview where one should look closer. Displays the N top candidates, where N defaults to 3 and can be set with the $Opt{solvetop} variable. Regressions results with an R^2 of 1.00 are displayed in any case.

The function is called when the option -solve is given on the commandline. Several extra config variables are calculated, see source code for details.


Andreas König


Please report any bugs or feature requests through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc CPAN::Testers::ParseReport

You can also look for information at:


Thanks to RJBS for module-starter.


Copyright 2008,2009,2010,2011,2012,2013,2014,2015,2016 Andreas König.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.