<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Parse::BACKPAN::Packages - Provide an index of BACKPAN

SYNOPSIS
      use Parse::BACKPAN::Packages;
      my $p = Parse::BACKPAN::Packages-&gt;new();
      print "BACKPAN is " . $p-&gt;size . " bytes\n";

      my @filenames = keys %$p-&gt;files;

      # see Parse::BACKPAN::Packages::File
      my $file = $p-&gt;file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
      print "That's " . $file-&gt;size . " bytes\n";

      # see Parse::BACKPAN::Packages::Distribution
      my @acme_colours = $p-&gt;distributions("Acme-Colour");
  
      my @authors = $p-&gt;authors;
      my @acmes = $p-&gt;distributions_by('LBROCARD');

DESCRIPTION
    The Comprehensive Perl Archive Network (CPAN) is a very useful
    collection of Perl code. However, in order to keep CPAN relatively
    small, authors of modules can delete older versions of modules to only
    let CPAN have the latest version of a module. BACKPAN is where these
    deleted modules are backed up. It's more like a full CPAN mirror, only
    without the deletions. This module provides an index of BACKPAN and some
    handy functions.

    The data is fetched from the net and cached for an hour.

METHODS
  new
    The constructor downloads a ~1M index file from the web and parses it,
    so it might take a while to run:

      my $p = Parse::BACKPAN::Packages-&gt;new();

  authors
    The authors method returns a list of all the authors. This is meant so
    that you can pass them into the distributions_by method:

      my @authors = $p-&gt;authors;

  distributions
    The distributions method returns a list of objects representing all the
    different versions of a distribution:

      # see Parse::BACKPAN::Packages::Distribution
      my @acme_colours = $p-&gt;distributions("Acme-Colour");

  distributions_by
    The distributions_by method returns a list of distribution names
    representing all the distributions that an author has uploaded:

      my @acmes = $p-&gt;distributions_by('LBROCARD');

  file
    The file method finds metadata relating to a file:

      # see Parse::BACKPAN::Packages::File
      my $file = $p-&gt;file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
      print "That's " . $file-&gt;size . " bytes\n";

  files
    The files method returns a hash reference where the keys are the
    filenames of the files on CPAN and the values are
    Parse::BACKPAN::Packages::File objects:

      my @filenames = keys %$p-&gt;files;

  size
    The size method returns the sum of all the file sizes in BACKPAN:

      print "BACKPAN is " . $p-&gt;size . " bytes\n";

AUTHOR
    Leon Brocard &lt;acme@astray.com&gt;

COPYRIGHT
    Copyright (C) 2005-9, Leon Brocard

LICENSE
    This module is free software; you can redistribute it or modify it under
    the same terms as Perl itself.

SEE ALSO
    CPAN::DistInfoname, Parse::BACKPAN::Packages::File,
    Parse::BACKPAN::Packages::Distribution, Parse::CPAN::Packages.

</pre></body></html>