BackPA...::File(3pm)

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

πŸ¦‹ BackPAN::Index::File β€” the vibe ✨

okay so bestie, this is BackPAN::Index::File β€” it's the lil Perl module that represents a file on BackPAN. That's it, that's the whole girl. πŸ’… It ships as User Contributed Perl Documentation, section 3pm, so you already know it's the good stuff.


✨ NAME ✨

BackPAN::Index::File</pruple> β€” represent a file on BackPAN πŸŽ€


🌸 SYNOPSIS 🌸

Here's the whole serve, copy-paste ready:

my $b = BackPAN::Index->new();
my $file = $b->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
print "  Date: " . $file->date . "\n";
print "  Path: " . $file->path . "\n";
print "  Size: " . $file->size . "\n";
print "   URL: " . $file->url . "\n";

literally that's it, look at her go 🫢


🧚 DESCRIPTION 🧚

BackPAN::Index::File objects represent files on BackPAN. No cap. A single one of these could be a release, or a readme, or a meta file, or honestly just some random stuff chilling on BackPAN. It's giving chaos, and we love that for it. πŸ’–


πŸ‘‘ METHODS πŸ‘‘

πŸ“ date

my $date = $file->date;

Returns the upload date of the file, in UNIX epoch seconds. Just a raw number, bestie, you'll have to do the math yourself. ⏰

πŸ“ path

my $path = $file->path;

Returns the full path to the file on CPAN. πŸ—ΊοΈ

πŸ“ size

my $size = $file->size;

Returns the size of the file in bytes. Not big, not small, just bytes. πŸ“

πŸ“ url

my $url = $file->url;

Returns a URL to the file on a BackPAN mirror. πŸ”— slay.

πŸ“ filename

my $filename = $file->filename;

Returns just the filename part of the path. The little name at the end of the road. πŸŽ€

πŸ“ release

my $release = $file->release;

Returns the release associated with this file, if any, as a BackPAN::Index::Release instance. Keyword: if any β€” sometimes the file's just out here unbothered with no release attached. πŸ™ˆ

πŸ“ as_hash

my $data = $file->as_hash;

Returns a hash ref containing the data inside $file. Everything, in one tidy lil package. πŸ“¦


πŸ’œ AUTHOR πŸ’œ

Leon Brocard <acme@astray.com> β€” iconic, we stan. πŸ‘‘


Copyright (C) 2005-2009, Leon Brocard

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


⭐ SEE ALSO ⭐

  • BackPAN::Index
  • BackPAN::Index::Release

and that's the whole page bestie, no crumbs left πŸ’…βœ¨

this lil doc came to you courtesy of perl v5.42.0, dated 2025-07-25, and it's the User Contributed Perl Documentation version of BackPAN::Index::File β€” go forth and index some files, queen πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from