CPAN::Testers::ParseReport - parse reports to www.cpantesters.org 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
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.
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.
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.
Reads one report. $target is the local filename to read. $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.
$Opt{solvetop}
The function is called when the option -solve is give on the commandline. Several extra config variables are calculated, see source code for details.
-solve
Andreas König
Please report any bugs or feature requests through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CPAN-Testers-ParseReport. 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:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-Testers-ParseReport
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/CPAN-Testers-ParseReport
CPAN Ratings
http://cpanratings.perl.org/d/CPAN-Testers-ParseReport
Search CPAN
http://search.cpan.org/dist/CPAN-Testers-ParseReport
Thanks to RJBS for module-starter.
Copyright 2008,2009,2010,2011,2012,2013 Andreas König.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CPAN::Testers::ParseReport, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Testers::ParseReport
CPAN shell
perl -MCPAN -e shell install CPAN::Testers::ParseReport
For more information on module installation, please visit the detailed CPAN module installation guide.