++ed by:

1 non-PAUSE user(s).

Breno G. de Oliveira

NAME

CPAN::Testers::Common::Client - Common class for CPAN::Testers clients

SYNOPSIS

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

    my $client = CPAN::Testers::Common::Client->new(
          author   => 'RJBS',
          distname => 'Data-UUID-1.217',
          grade    => 'pass',
    );

    # what you should send to CPAN Testers, via Metabase
    my $metabase_data = $client->populate;
    my $email_body    = $client->email;

Although the recommended way is to construct your object passing as much information as possible:

    my $client = CPAN::Testers::Common::Client->new(
          distname         => 'Data-UUID-1.217',
          author           => 'Ricardo Signes',
          grade            => 'pass',
          comments         => 'this is an auto-generated report. Cheers!',
          via              => 'My Awesome Client App 1.0',

          # you should provide at least 'test_output' to the author,
          # otherwise he/she won't know what went wrong!
          configure_output => '...',
          build_output     => '...',
          test_output      => '...',

          # same as in a META.yml 2.0 structure
          prereqs => {
              runtime => {
                requires => {
                  'File::Basename' => '0',
                },
                recommends => {
                  'ExtUtils::ParseXS' => '2.02',
                },
              },
              build => {
                requires => {
                  'Test::More' => '0',
                },
              },
              # etc.
          },
          # alternatively, if the dist is expanded in a local dir and has a Meta 2.0 {json,yml} file
          # you can just point us to the build_dir and we'll extract the prereqs ourselves:
          # build_dir => '/tmp/Data-UUID-1.217/'
    );

DESCRIPTION

This module provides a common client for constructing metabase facts and the legacy email message sent to CPAN Testers in a way that is properly parsed by the extraction and report tools. It is meant to be used by all the CPAN clients (and standalone tools) that want/need to support the CPAN Testers infrastructure.

If you need to parse or write to the common CPAN Testers configuration file, please refer to the highly experimental CPAN::Testers::Common::Client::Config.

Constructor

Calling new() creates a new object. You must pass a hash as argument setting at least distname, author and grade. See below for their meaning.

Accessors

  • author - the evaluated distribution's author. Could be a PAUSE id or a full name. Required.

  • distname - distribution name, in Dist-Name-version.suffix format. Required.

  • grade - 'pass', 'fail', 'na', 'unknown'. Required.

  • comments - tester's comments. Defaults to 'none provided' (but see "AUTOMATED_TESTING" below)

  • via - sender module (CPAN::Reporter, CPANPLUS, etc). Defaults to "Your friendly CPAN Testers client"

  • command - the command used to test the distribution.

Methods

populate()

Will populate the object with information for each Metabase fact, and create the CPAN Testers email body.

Returns a data structure containing all metabase facts data.

email()

Returns a string to be used as body of the email to CPAN Testers.

This method will call populate() if populate hasn't been called yet.

metabase_data()

Returns the already populated metabase data structure. Note that this will NOT call populate() so you will get undef or cached data unless you call populate() yourself.

CONFIGURATION AND ENVIRONMENT

AUTOMATED_TESTING

If the AUTOMATED_TESTING environment variable is set to true, the default comment will be:

   this report is from an automated smoke testing program
   and was not reviewed by a human for accuracy

Otherwise, the default message is 'none provided'.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/garu/CPAN-Testers-Common-Client

  git clone https://github.com/garu/CPAN-Testers-Common-Client.git

DIAGNOSTICS

Could not create temporary '$FILE' for prereq analysis: $DESCRIPTION

In order to analyse a distribution's pre-requirements, we must create a temporary file $FILE. The $DESCRIPTION should contain the error found.

Error parsing output from CPAN::Testers::Common::Client::PrereqCheck: $LINE

While parsing the pre-requirements result, the given $LINE couldn't be processed correctly. Please report the issue, patches will be welcome.

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-cpan-testers-common-client@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Breno G. de Oliveira <garu@cpan.org>

ACKNOWLEDGMENTS

This module was created at the http://2012.qa-hackathon.org, so a big THANK YOU is in order to all the companies and organisations that supported it, namely the http://www.cite-sciences.fr/, http://www.diabolocom.com/|Diabolocom, http://www.dijkmat.nl/|Dijkmat, http://www.duckduckgo.com/|DuckDuckGo, http://www.dyn.com/|Dyn, http://freeside.biz/|Freeside, http://www.hederatech.com/|Hedera, http://www.jaguar-network.com/|Jaguar, http://www.shadow.cat/|ShadowCat, http://www.splio.com/|Splio, http://www.teclib.com/|TECLIB', http://weborama.com/|Weborama, http://www.enlightenedperl.org/|EPO, http://www.perl-magazin.de/ and http://www.mongueurs.net/.

Also, this module could never be done without the help, contribution and insights of https://metacpan.org/author/DAGOLDEN, https://metacpan.org/author/BARBIE|Barbie, https://metacpan.org/author/ANDK and https://metacpan.org/author/MIYAGAWA.

All bugs and mistakes are my own.

LICENCE AND COPYRIGHT

Copyright (c) 2012-2013, Breno G. de Oliveira <garu@cpan.org>. All rights reserved.

Parts of the internals in this distribution were refactored from CPAN::Reporter, Copyright (c) 2012 David Golden, and from CPAN::Version, Copyright (c) 2012 Andreas Koenig.

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

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 726:

=back without =over

Around line 817:

alternative text 'http://2012.qa-hackathon.org' contains non-escaped | or /

alternative text 'http://www.cite-sciences.fr/' contains non-escaped | or /

alternative text 'http://www.perl-magazin.de/' contains non-escaped | or /

alternative text 'http://www.mongueurs.net/' contains non-escaped | or /

Around line 827:

alternative text 'https://metacpan.org/author/DAGOLDEN' contains non-escaped | or /

alternative text 'https://metacpan.org/author/ANDK' contains non-escaped | or /

alternative text 'https://metacpan.org/author/MIYAGAWA' contains non-escaped | or /




Hosting generously
sponsored by Bytemark