GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CPAN::Testers::Common::Client::History(3) User Contributed Perl Documentation CPAN::Testers::Common::Client::History(3)

CPAN::Testers::Common::Client::History - read/write CPAN Testers' history file

You should not call this module directly. Instead, use the public interface available via CPAN::Testers::Common::Client:

    use CPAN::Testers::Common::Client;

    my $client = CPAN::Testers::Common::Client->new(
        distname => 'Class-Load-0.22',
        author   => 'Karen Etheridge',
        grade    => 'pass',
    );

    if (! $client->is_duplicate ) {
        $client->record_history;
    }

This modules provides a common interface for interacting with the CPAN Tester's history file used by compatible clients.

Most methods are private for use only within CPAN::Testers::Common::Client itself, through the API provided in the SYNOPSIS. However, if you really want/need to fiddle with the history file, we do provide a few helper functions. Just keep reading.

This module provides the following interface. No functions are exported by default.

    my $data = {
        dist_name => 'Class-Load-0.22',
        phase     => 'test',
        grade     => 'PASS'
    };

    if (CPAN::Testers::Common::Client::History::is_duplicate( $data )) {
        # don't send duplicate reports!
    }

From a simple hash reference with some testing data, returns true if there is a record of this report on the history file, and false otherwise.

    CPAN::Testers::Common::Client::History::record_history({
        dist_name => 'Clone',
        phase     => 'test',
        grade     => 'NA'
    });

Writes to the history file, adding the entry provided by the given hashref.

    # all reports for Foo-Bar-1.23
    @results = have_tested( dist => 'Foo-Bar-1.23' );
 
    # all NA reports
    @results = have_tested( grade => 'NA' );
 
    # all reports on the current Perl/platform
    @results = have_tested();

Searches the CPAN Testers' history file for records exactly matching the search criteria, given as pairs of field-names and desired values.

Ordinary search criteria include:

  • "dist" -- the distribution tarball name without any filename suffix; from a "CPAN::Distribution" object, this is provided by the base_id method.
  • "phase" -- phase the report was generated during: either 'PL', 'make' or 'test'.
  • "grade" -- CPAN Testers grade: 'PASS', 'FAIL', 'NA' or 'UNKNOWN'; Also may be 'DISCARD' for any failing reports not sent due to missing prerequisites.

Without additional criteria, a search will be limited to the current version of Perl and the current architecture and OS version. Additional criteria may be specified explicitly or, by specifying the empty string, "q{}", will match that field for any record.

    # all reports for Foo-Bar-1.23 on any version of perl
    # on the current architecture and OS version
    @results = have_tested( dist => 'Foo-Bar-1.23', perl => q{} );

These additional criteria include:

  • "perl" -- perl version and possible patchlevel; this will be dotted decimal (5.6.2) starting with version 5.6, or will be numeric style as given by $] for older versions; if a patchlevel exists, it must be specified similar to "5.11.0 patch 12345".
  • "archname" -- platform architecture name as given by $Config{archname}.
  • "osvers" -- operating system version as given by $Config{osvers}.

    The function returns an array of hashes representing each test result, with all of the fields listed above.

CPAN::Testers::Common::Client
2015-04-19 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.