MetaCP...::File(3pm)

๐Ÿ’– MetaCP...::File(3pm) โ€” the File data object, bestie edition ๐Ÿ’–

okay so this is MetaCPAN::Client::File, a Perl module from the User Contributed Perl Documentation, and it's literally just a File data object. that's the whole vibe. it's the little wrapper that holds one file's worth of MetaCPAN truth. let's get into it ๐Ÿซถ


โœจ VERSION โœจ

version 2.044000

๐ŸŒธ DESCRIPTION ๐ŸŒธ

A MetaCPAN file entity object.

like. it's a file. it's an object. it's an entity. slay ๐Ÿ’…


๐ŸŽ€ ATTRIBUTES ๐ŸŽ€

every one of these is a thing you can ask this object about itself. no skips, no cuts, all of them are here:

  • status โ€” gives you the release status, and it's one of "backpan", "cpan", or "latest". vibe check passed โœจ
  • date โ€” an ISO8601 datetime string, like "2016-11-19T12:41:46", telling you when the file got uploaded. timestamped, periodt ๐Ÿ•
  • author โ€” the author's PAUSE id. that's their whole identity on the CPAN streets ๐Ÿชช
  • maturity โ€” either "release" or "developer". two options, no in-between, pick a lane ๐ŸŒˆ
  • directory โ€” a boolean: does this path represent a directory or not? yes/no, iconic behavior ๐Ÿ“
  • indexed โ€” a boolean: is the content indexed or not? ๐Ÿ”
  • documentation โ€” the name of the module this file contains docs for. heads up though: this one may be undef. not me getting undef'd ๐Ÿ˜ญ
  • id โ€” the file's internal MetaCPAN id. the backstage pass ๐ŸŽŸ๏ธ
  • authorized โ€” a boolean: was this file part of an authorized upload? โœ…
  • version โ€” the distribution version that contains this file.
  • version_numified โ€” the numified version of the distribution that contains the file. yes it's numified. no we don't make the rules ๐Ÿ”ข
  • release โ€” the release that contains this file, something like "Moose-2.2004". iconic name ngl ๐Ÿฎ
  • binary โ€” a boolean: does this file contain binary content? ๐Ÿงฌ
  • name โ€” the File's name, without any directory path included. just the name, bestie โœ‚๏ธ
  • path โ€” the file's path inside the distribution archive, relative to the root of the archive ๐Ÿ—บ๏ธ
  • abstract โ€” if the file contains POD with a "NAME" section, this attribute holds the abstract portion of that name. cute lil summary energy ๐Ÿ“
  • deprecated โ€” the deprecated field value for this file. it's giving expired, fr fr ๐Ÿ’€
  • description โ€” if the file contains POD with a "DESCRIPTION" section, this attribute contains that description ๐Ÿ“–
  • distribution โ€” the name of the distribution that contains the file ๐Ÿ“ฆ
  • level โ€” a 0-indexed indication of how many directories deep this file is, relative to the archive root. (0-indexed!! programmers stay unhinged ๐Ÿ’…)
  • sloc โ€” if the file contains code, this holds the number of lines of code in the file. sloc = source lines of code, iykyk โŒจ๏ธ
  • slop โ€” if the file contains POD, this holds the number of lines of POD in the file. slop!! yes really, slop ๐Ÿฒ
  • mime โ€” the file's mime type ๐ŸŽญ
  • module โ€” if the file contains module indexed by PAUSE, this attribute holds an arrayref of hashrefs, one for each module. those hashrefs have these keys:
    • name โ€” the module name.
    • indexed โ€” whether or not the file is indexed by MetaCPAN.
    • authorized โ€” whether or not the module is part of an authorized upload.
    • version โ€” the version of the module that this file contains.
    • version_numified โ€” the numified version of the module that this file contains.
    • associated_pod โ€” a path you can use with the "MetaCPAN::Client->file" method to get the file that contains POD for this module. in most cases that's gonna be the same file as the one that contains this "module" data. convenient โœจ
  • pod_lines โ€” An arrayref. that's it. that's the description. short king ๐Ÿ‘‘
  • stat โ€” a hashref containing stat() all information about the file ๐ŸŒธ the keys are:
    • mtime โ€” the Unix epoch of the file's last modified time โณ
    • mode โ€” the file's mode, as an integer, not an octal representation. read that again, bestie!! ๐Ÿšจ
    • size โ€” the file's size in bytes ๐Ÿ“
  • download_url โ€” a URL for the distribution archive that contains this file. go get it ๐Ÿ”—

๐Ÿ”ฅ METHODS ๐Ÿ”ฅ

๐Ÿงš pod

my $pod = $module->pod(); # default = plain
my $pod = $module->pod($type);

Returns the POD content for the module/file.

Takes a type as argument.

Supported types: plain, html, x-pod, x-markdown. four flavors, all valid, all slay ๐Ÿ’…

๐Ÿฆ‹ source

my $source = $module->source();

Returns the source code for the file. the actual real code, periodt โŒจ๏ธ๐Ÿ’–

๐Ÿ‘‘

metacpan_url

Returns a link to the file source page on MetaCPAN. clickable excellence ๐Ÿ”—โœจ


๐Ÿ’œ AUTHORS ๐Ÿ’œ

  • Sawyer X <xsawyerx@cpan.org>
  • Mickey Nasriachi <mickey@cpan.org>

the icons who built this. we love them ๐Ÿซถ


This software is copyright (c) 2016 by Sawyer X.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

lowkey the most generous license setup โ€” do what you want, just keep the same terms. bestie behavior fr fr ๐Ÿ“

and that's the whole page, no notes ๐Ÿ’– this was documented under perl v5.40.1 and stamped 2026-07-05 โ€” shoutout to those exact numbers, and to MetaCP...::File(3pm) for being the moment. mwah, go read some source code, you got this ๐Ÿ‘‘๐ŸŒธ

๐Ÿ“ฆ where this page comes from