NAME

CPAN::Testers::Schema::Result::Upload - Information about uploads to CPAN

VERSION

version 0.027

SYNOPSIS

my $upload = $schema->resultset( 'Upload' )
    ->search( dist => 'My-Dist', version => '0.01' )->first;

say $row->author . " released as " . $row->filename;
say scalar localtime $row->released;
if ( $row->type eq 'backpan' ) {
    say "Deleted from CPAN";
}

my $new_upload = $schema->resultset( 'Upload' )->create({
    type => 'cpan',
    dist => 'My-Dist',
    version => '1.001',
    author => 'PREACTION',
    filename => 'My-Dist-1.001.tar.gz',
    released => 1366237867,
});

DESCRIPTION

This table contains information about uploads to CPAN, including who uploaded it, when it was uploaded, and when it was deleted (and thus only available to BackPAN).

NOTE: Since files can be deleted from PAUSE, and new files uploaded with the same name, distribution, and version, there may be duplicate dist => version pairs in this table. This table does not determine which packages were authorized and indexed by PAUSE for installation by CPAN clients.

This data is read directly from the local CPAN mirror by CPAN::Testers::Data::Uploads and written to this table.

ATTRIBUTES

uploadid

The ID of this upload. Auto-generated.

type

This column indicates where the distribution is. It can be one of three values:

cpan

This distribution is on CPAN

backpan

This distribution has been deleted from CPAN and is only available on BackPAN

upload

This distribution has been reported via NNTP (nntp.perl.org group perl.cpan.uploads), but has not yet been seen on CPAN itself.

author

The PAUSE ID of the user who uploaded this distribution.

dist

The distribution name, parsed from the uploaded file's name using CPAN::DistnameInfo.

version

The version of the distribution, parsed from the uploaded file's name using CPAN::DistnameInfo.

filename

The full file name uploaded to CPAN, without the author directory prefix.

released

The date/time of the dist release. Calculated from the file's modified time, as synced by the CPAN mirror sync system, or from the upload notification message time from the NNTP group.

Inflated from a UNIX epoch into a DateTime object.

METHODS

report_metrics

The linked report metrics rows for this distribution, a CPAN::Testers::Schema::ResultSet::Release object.

report_stats

The linked report stats rows for this distribution, a CPAN::Testers::Schema::ResultSet::Stats object.

SEE ALSO

DBIx::Class::Row, CPAN::Testers::Schema

AUTHORS

  • Oriol Soriano <oriolsoriano@gmail.com>

  • Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 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.