NAME

BackPAN::Index::Create - generate an index file for a BackPAN mirror

SYNOPSIS

use BackPAN::Index::Create;

create_backpan_index({
     basedir       => '/path/to/backpan'
     releases_only => 0 | 1,
     output        => 'backpan-index.txt',
});

DESCRIPTION

BackPAN::Index::Create creates a text index file for a BackPAN index. By default it will generate an index that looks like this:

#FORMAT 1
authors/id/B/BA/BARBIE/Acme-CPANAuthors-British-1.01.meta.txt 1395991503 1832
authors/id/B/BA/BARBIE/Acme-CPANAuthors-British-1.01.readme.txt 1395991503 1912
authors/id/B/BA/BARBIE/Acme-CPANAuthors-British-1.01.tar.gz 1395991561 11231

The first line is a comment that identifies the revision number of the index format. For each file in the BackPAN mirror the index will then contain one line. Each line contains three items:

  • path

  • timestamp

  • size (in bytes)

If the releases_only option is true, then the index will only contain release tarballs, and the paths won't include the leading authors/id/:

#FORMAT 1
B/BA/BARBIE/Acme-CPANAuthors-British-1.01.tar.gz 1395991561 11231

SEE ALSO

create-backpan-index - a script that provides a command-line interface to this module, included in the same distribution.

BackPAN::Index - an interface to an alternate BackPAN index.

REPOSITORY

https://github.com/neilbowers/BackPAN-Index-Create

AUTHOR

Neil Bowers <neilb@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Neil Bowers <neilb@cpan.org>.

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