Barbie > CPAN-Testers-WWW-Reports-Parser-0.01 > CPAN::Testers::WWW::Reports::Parser

Download:
CPAN-Testers-WWW-Reports-Parser-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs

Module Version: 0.01   Source  

NAME ^

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

SYNOPSIS ^

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

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

  # 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.
  }

  # iterator, filtering field names
  $obj->filter(@fields);
  $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

DESCRIPTION ^

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.

INTERFACE ^

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.

BUGS, PATCHES & FIXES ^

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 dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.

RT: http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Reports-Parser

SEE ALSO ^

http://www.cpantesters.org/, http://stats.cpantesters.org/, http://wiki.cpantesters.org/, http://blog.cpantesters.org/

AUTHOR ^

  Barbie <barbie@cpan.org> 2009-present

COPYRIGHT AND LICENSE ^

  Copyright (C) 2009 Barbie <barbie@cpan.org>

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