The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CPAN::Testers::Schema::ResultSet::Stats - Query the raw test reports

VERSION

version 0.012

SYNOPSIS

    my $rs = $schema->resultset( 'Stats' );
    $rs->insert_test_report( $schema->resultset( 'TestReport' )->first );

DESCRIPTION

This object helps to insert and query the legacy test reports (cpanstats).

METHODS

insert_test_report

    my $stat = $rs->insert_test_report( $report );

Convert a CPAN::Testers::Schema::Result::TestReport object to the new test report structure and insert it into the database. This is for creating backwards-compatible APIs.

Returns an instance of CPAN::Testers::Schema::Result::Stats on success. Note that since an uploadid is required for the cpanstats table, this method throws an exception when an upload cannot be determined from the given information.

SEE ALSO

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

AUTHORS

  • Oriol Soriano <oriolsoriano@gmail.com>

  • Doug Bell <preaction@cpan.org>

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.