Barbie > CPAN-Testers-WWW-Reports-Query-Report-0.03 > CPAN::Testers::WWW::Reports::Query::Report



Annotate this POD

View/Report Bugs
Module Version: 0.03   Source   Latest Release: CPAN-Testers-WWW-Reports-Query-Report-0.05


CPAN::Testers::WWW::Reports::Query::Report - Retrieve CPAN Testers report direct from the CPAN Testers website.


This module queries the CPAN Testers website and retrieves a specific report.


    # default options
    my %options = (
        as_json => 0,                       # the default
        as_hash => 0,                       # the default
        host    => '' # the default

    # establish the object
    my $query = CPAN::Testers::WWW::Reports::Query::Report->new( %options );

The default is to return a Metabase::Fact, as a CPAN::Testers::Report object. If you wish to manipulate this differently, use the as_json or as_hash to return more simplified forms.

    # get by id
    my $result = $query->report( report => 40000000 );

    # get by GUID
    $result = $query->report( report => '0b3fd09a-7e50-11e3-9609-5744ee331862' );

    # force return as JSON
    my $result = $query->report( report => 40000000, as_json => 1 );

    # force return as a hash
    my $result = $query->report( report => 40000000, as_hash => 1 );

The as_json and as_hash options here will override the general options supplied in the object constructor. If you've specified as_json or as_hash in the object constructor, to override simply set 'as_json => 0' and/or 'as_hash => 0' in the method call.

    # get the last error
    my $error = $query->error;

If the result is returned as undef, either no report was found or the JSON return is malformed. This could be due to network connection, or corrupt data in the report. If the latter please notify the CPAN Testers discussion list, so we can investigate and correct as appropriate.


The Constructor

Search Methods

Data Methods


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.

RT Queue -


CPAN::Testers::Data::Generator, CPAN::Testers::WWW::Reports,,

Initially written during the 2014 QA Hackathon in Lyon.


  Barbie, <>
  for Miss Barbell Productions <>.


  Copyright (C) 2014 Barbie for Miss Barbell Productions.

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