Parse:...ckages(3pm)
β¨ Parse::BACKPAN::Packages β the whole vibe β¨
okay so bestie, welcome to the Parse:...ckages(3pm) page, aka the User Contributed Perl Documentation entry for Parse::BACKPAN::Packages π
she's a Perl module, she's deprecated, and she still ate, so let's get into it.
πΈ NAME πΈ
Parse::BACKPAN::Packages β she provides an index of BACKPAN. that's it, that's the job π
π¦ SYNOPSIS π¦
here's the whole flex, copy-paste ready:
use Parse::BACKPAN::Packages;
my $p = Parse::BACKPAN::Packages->new();
print "BACKPAN is " . $p->size . " bytes\n";
my @filenames = keys %$p->files;
# see Parse::BACKPAN::Packages::File
my $file = $p->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
print "That's " . $file->size . " bytes\n";
# see Parse::BACKPAN::Packages::Release
my @acme_colours = $p->releases("Acme-Colour");
my @authors = $p->authors;
my @acmes = $p->distributions_by('LBROCARD');
like, look at her go π«Ά
π DESCRIPTION π
okay so first thing, and this is the important part bestie: Parse::BackPAN::Packages has been DEPRECATED. π please go use the faster and more flexible BackPAN::Index instead. she's still iconic but she's retired, no cap.
so like, context: The Comprehensive Perl Archive Network (CPAN) is a very useful collection of Perl code. but to keep CPAN relatively small, authors of modules can delete older versions of modules so that CPAN only has the latest version of a module. BACKPAN is where those deleted modules get backed up πΎ it's basically a full CPAN mirror, except without the deletions. this module gives you an index of BACKPAN plus some handy functions β¨
also, the data is fetched from the net and cached for an hour. just so you know. π
π METHODS π
π new
the constructor. she downloads a ~1M index file from the web and parses it, so yeah it might take a while to run:
my $p = Parse::BACKPAN::Packages->new();
by default it caches the file locally for one hour. and if you do not want that caching, you can pass in:
my $p = Parse::BACKPAN::Packages->new( { no_cache => 1 } );
slay. no notes. π
π authors
the authors method returns a list of all the authors. it's meant so that you can pass them into the distributions_by method:
my @authors = $p->authors;
π distributions
my $distributions = $p->distributions;
the distributions method returns an array ref of the names of all the distributions in BackPAN. yes it's an array ref, don't @ me, that's just how she is. π
π releases
the releases method returns a list of objects representing all the different releases of a distribution:
# see Parse::BACKPAN::Packages::Release
my @acme_colours = $p->releases("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->distributions_by('LBROCARD');
π file
the file method finds metadata relating to a file:
# see Parse::BACKPAN::Packages::File
my $file = $p->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
print "That's " . $file->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->files;
π size
the size method returns the sum of all the file sizes in BACKPAN:
print "BACKPAN is " . $p->size . " bytes\n";
big number energy honestly π
β AUTHOR β
Leon Brocard <acme@astray.com>
π 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 π₯
BackPAN::Index, CPAN::DistInfoname
and that's the whole page bestie π«Ά this was perl v5.42.0, dated 2025-07-25, from Parse:...ckages(3pm) β go forth, index responsibly, and remember: deprecated but never forgotten πβ¨
π¦ where this page comes from
- fedora 43: perl-BackPAN-Index 0.42-35.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms