View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Barbie > CPAN-Testers-WWW-Reports-Parser > CPAN::Testers::WWW::Reports::Parser



Annotate this POD


View/Report Bugs
Module Version: 0.06   Source  


CPAN::Testers::WWW::Reports::Parser - CPAN Testers reports data parser


The parser can be used in two different ways, either by accessing each report as a hashref (each field having a key/value pair entry) or via an object.

The hashref access API:

  use CPAN::Testers::WWW::Reports::Parser;

  my $obj = CPAN::Testers::WWW::Reports::Parser->new(
        format => 'YAML',   # or 'JSON'
        file   => $file     # or data => $data

  # iterator, filtering field names
  $obj->filter('ALL', @fields);
  while( my $data = $obj->report() ) {
      # automatically populates the returned hash with the fields required.
      # removes any field values not requested, unless the first value in the 
      # list is the string 'ALL'.

  $obj->filter();   # reset to default original hash

  # note that filter() will also affect the reports() method.

  # full array of hashes
  my $data = $obj->reports();              # array of original hashes
  my $data = $obj->reports(@fields);       # array of amended hashes
  my $data = $obj->reports('ALL',@fields); # array of original + amended hashes

The object access API:

  use CPAN::Testers::WWW::Reports::Parser;

  # if 'objects' was set, then $obj->report() will return
  # CPAN::Testers::WWW::Reports::Report objects instead of a hashref

  my $obj = CPAN::Testers::WWW::Reports::Parser->new(
        format  => 'YAML',   # or 'JSON'
        file    => $file     # or data => $data
        objects => 1,        # Optional, works with $obj->report()

  # iterator, accessing aternate field names
  while( my $data = $obj->report() ) {
      my $dist = $obj->distribution(); # or $obj->dist(), or $obj->distname()

      # note that the object is used to reference the methods retrieving
      # the individual field names, as the $data variable is a hashref to a
      # hash of a single report.


This distribution is used to extract the data from either a JSON or a YAML file containing metadata regarding reports submitted by CPAN Testers, and available from the CPAN Testers website.


The Constructor

Report Methods

Field methods

Please note that this distribution aims to aid backwards compatibility regards the contents of the reports data. If the data ever needs to change, then upgrading to the latest release of this distribution, should enable you to continue using older, depreciated field names within your code.


CPAN Testers wouldn't exist without the help and support of the Perl community. However, since 2008 CPAN Testers has grown far beyond the expectations of it's original creators. As a consequence it now requires considerable funding to help support the infrastructure.

In early 2012 the Enlightened Perl Organisation very kindly set-up a CPAN Testers Fund within their donatation structure, to help the project cover the costs of servers and services.

If you would like to donate to the CPAN Testers Fund, please follow the link below to the Enlightened Perl Organisation's donation site.

If your company would like to support us, you can donate financially via the fund link above, or if you have servers or services that we might use, please send an email to with details.

Our full list of current sponsors can be found at our I <3 CPAN Testers site.


There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send bug reports and patches to the RT Queue (see below).

Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me.




  Barbie <> 2009-present


  Copyright (C) 2009-2014 Barbie <>

  This module is free software; you can redistribute it and/or
  modify it under the Artistic License 2.0.
syntax highlighting: