1Parse::BACKPAN::PackageUss(e3r)Contributed Perl DocumentPaatrisoen::BACKPAN::Packages(3)
2
3
4

NAME

6       Parse::BACKPAN::Packages - Provide an index of BACKPAN
7

SYNOPSIS

9         use Parse::BACKPAN::Packages;
10         my $p = Parse::BACKPAN::Packages->new();
11         print "BACKPAN is " . $p->size . " bytes\n";
12
13         my @filenames = keys %$p->files;
14
15         # see Parse::BACKPAN::Packages::File
16         my $file = $p->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
17         print "That's " . $file->size . " bytes\n";
18
19         # see Parse::BACKPAN::Packages::Release
20         my @acme_colours = $p->releases("Acme-Colour");
21
22         my @authors = $p->authors;
23         my @acmes = $p->distributions_by('LBROCARD');
24

DESCRIPTION

26       Parse::BackPAN::Packages has been DEPRECATED.  Please use the faster
27       and more flexible BackPAN::Index.
28
29       The Comprehensive Perl Archive Network (CPAN) is a very useful
30       collection of Perl code. However, in order to keep CPAN relatively
31       small, authors of modules can delete older versions of modules to only
32       let CPAN have the latest version of a module. BACKPAN is where these
33       deleted modules are backed up. It's more like a full CPAN mirror, only
34       without the deletions. This module provides an index of BACKPAN and
35       some handy functions.
36
37       The data is fetched from the net and cached for an hour.
38

METHODS

40   new
41       The constructor downloads a ~1M index file from the web and parses it,
42       so it might take a while to run:
43
44         my $p = Parse::BACKPAN::Packages->new();
45
46       By default it caches the file locally for one hour. If you do not want
47       this caching then you can pass in:
48
49         my $p = Parse::BACKPAN::Packages->new( { no_cache => 1 } );
50
51   authors
52       The authors method returns a list of all the authors. This is meant so
53       that you can pass them into the distributions_by method:
54
55         my @authors = $p->authors;
56
57   distributions
58         my $distributions = $p->distributions;
59
60       The distributions method returns an array ref of the names of all the
61       distributions in BackPAN.
62
63   releases
64       The releases method returns a list of objects representing all the
65       different releases of a distribution:
66
67         # see Parse::BACKPAN::Packages::Release
68         my @acme_colours = $p->releases("Acme-Colour");
69
70   distributions_by
71       The distributions_by method returns a list of distribution names
72       representing all the distributions that an author has uploaded:
73
74         my @acmes = $p->distributions_by('LBROCARD');
75
76   file
77       The file method finds metadata relating to a file:
78
79         # see Parse::BACKPAN::Packages::File
80         my $file = $p->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
81         print "That's " . $file->size . " bytes\n";
82
83   files
84       The files method returns a hash reference where the keys are the
85       filenames of the files on CPAN and the values are
86       Parse::BACKPAN::Packages::File objects:
87
88         my @filenames = keys %$p->files;
89
90   size
91       The size method returns the sum of all the file sizes in BACKPAN:
92
93         print "BACKPAN is " . $p->size . " bytes\n";
94

AUTHOR

96       Leon Brocard <acme@astray.com>
97
99       Copyright (C) 2005-9, Leon Brocard
100

LICENSE

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

SEE ALSO

106       BackPAN::Index, CPAN::DistInfoname
107
108
109
110perl v5.34.0                      2021-07-22       Parse::BACKPAN::Packages(3)
Impressum