Parse:...ckages(3pm)

πŸ“¦
version 0.42 Β· 2 versions
, in fedora 43

✨ 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 (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