💯 Doug Bell
and 3 contributors

NAME

CPAN::Testers::Schema - Schema for CPANTesters database processed from test reports

VERSION

version 0.013

SYNOPSIS

    my $schema = CPAN::Testers::Schema->connect( $dsn, $user, $pass );
    my $rs = $schema->resultset( 'Stats' )->search( { dist => 'Test-Simple' } );
    for my $row ( $rs->all ) {
        if ( $row->state eq 'fail' ) {
            say sprintf "Fail report from %s: http://cpantesters.org/cpan/report/%s",
                $row->tester, $row->guid;
        }
    }

DESCRIPTION

This is a DBIx::Class Schema for the CPANTesters statistics database. This database is generated by processing the incoming data from the CPANTesters Metabase, and extracting the useful fields like distribution, version, platform, and others (see CPAN::Testers::Schema::Result::Stats for a full list).

This is its own distribution so that it can be shared by the backend processing, data APIs, and the frontend web application.

METHODS

connect_from_config

    my $schema = CPAN::Testers::Schema->connect_from_config;

Connect to the MySQL database using a local MySQL configuration file in $HOME/.cpanstats.cnf. This configuration file should look like:

    [client]
    host     = ""
    database = cpanstats
    user     = my_usr
    password = my_pwd

See "mysql_read_default_file" in DBD::mysql.

ordered_schema_versions

Get the available schema versions by reading the files in the share directory. These versions can then be upgraded to using the cpantesters-schema script.

SEE ALSO

CPAN::Testers::Schema::Result::Stats, DBIx::Class

AUTHORS

  • Oriol Soriano <oriolsoriano@gmail.com>

  • Doug Bell <preaction@cpan.org>

CONTRIBUTORS

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

  • Joel Berger <joel.a.berger@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Oriol Soriano, Doug Bell.

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