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

NAME

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

SYNOPSIS

 use BackPAN::Index::Create qw/ create_backpan_index /;

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

DESCRIPTION

BackPAN::Index::Create provides a function create_backpan_index() that will create a text index file for a BackPAN CPAN mirror. A BackPAN CPAN mirror is like a regular CPAN mirror, but it has everything that has ever been released to CPAN. The canonical BackPAN mirror is backpan.perl.org.

By default the generated index will look 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.