NAME

CPAN::Testers::Schema::Result::LatestIndex - A cache of the latest version of a dist by author

VERSION

version 0.027

SYNOPSIS

my $ix = $schema->resultset( 'LatestIndex' )->find({
    dist => 'My-Dist',
    author => 'PREACTION',
});

$schema->resultset( 'LatestIndex' )->find_or_create({
    dist => 'My-Dist',
    author => 'PREACTION',
    uploadid => 23,
    version => '1.003',
    released => 1479410521,
    oncpan => 1,
});

DESCRIPTION

This table stores the latest version of a dist that was uploaded by an author. This information is used to build author pages.

This table is a cache of information already found in the uploads table. See CPAN::Testers::Schema::Result::Upload.

This data is generated by CPAN::Testers::Data::Uploads.

XXX: This table violates 3NF. If we want to continue doing so, we need to have a good reason. Remove this note when we find that reason, or else remove this module/table entirely.

ATTRIBUTES

dist

The distribution name. Composite primary key with "author". Copied from the `dist` column of the `uploads` table.

author

The distribution author. Composite primary key with "dist". Copied from the `author` column of the `uploads` table.

version

The version of the distribution release. Copied from the `version` column of the `uploads` table.

released

The UNIX epoch of the release. Copied from the `released` column of the `uploads` table.

oncpan

An integer deciding whether this release is on CPAN. If 0, this release is not available on CPAN. If 1, this release is available on CPAN or was reported by the CPAN upload notification system (`cpan` or `upload` value in the `type` column on the `uploads` table). If 2, this release is available on BackPAN.

uploadid

The ID of this upload from the `uploads` table.

METHODS

upload

Get the related row from the `uploads` table. See CPAN::Testers::Schema::Result::Upload.

SEE ALSO

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

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.