Dist::...ta::Dir(3pm)
π Dist::Metadata::Dir β bestie edition π
okay so this is a page from the User Contributed Perl Documentation, section 3pm, and the module is Dist::Metadata::Dir β yeah the header's all squished and abbreviated but it's her, it's our girl. she's literally the directory-flavored sibling of Dist::Metadata and she's here to help you pull dist metadata straight out of a folder. slay. π
β¨ NAME β¨
Dist::Metadata::Dir β the glow-up that lets Dist::Metadata work its magic on a directory. ποΈ
πΈ VERSION πΈ
version 0.927 π
π¦ SYNOPSIS π¦
my $dm = Dist::Metadata->new(dir => $path_to_dir);
that's it. that's the whole vibe. one line and you're in. π
π DESCRIPTION π
so like, this is a subclass of Dist::Metadata::Dist, right? and what it does is unlock the ability to get a dist's metadata out of a directory instead of a tarball or whatever. iconic behavior honestly.
when is this useful, you ask? when you already have a dist that's been extracted into a directory and you're standing there like "okay but what's in you π₯Ί". that's the moment. that's her moment.
lowkey though β on its own this thing is probably not very useful. fr fr. you're meant to use it through "new" in Dist::Metadata, like a supporting character with main character energy. don't come for me, it's what the docs say. π
π METHODS π
π« new
$dist = Dist::Metadata::Struct->new(dir => $path);
takes exactly one argument: 'dir', and it should be a path to a directory. just one. she's not complicated. β¨
π« determine_name_and_version
does exactly what it says on the tin, bestie β it attempts to parse the name and the version out of the directory name. detective mode. π
π« dir
hands you back the "dir" attribute you gave it in the constructor. no thoughts, just vibes, just the dir. π«Ά
π« file_content
gives you the content for the file you asked for. the actual contents. the tea. π΅
π« find_files
returns a list of the file names living beneath the directory β and heads up, those names are relative to the directory, not absolute. iykyk. π
π« physical_directory
returns the "dir" attribute, because β plot twist β this already is a directory containing the files you want. like, she IS the moment. no conversion needed, no cap. π
π AUTHOR π
Randy Stauner <rwstauner@cpan.org> β thank you for your service, king π«‘π
β COPYRIGHT AND LICENSE β
this software is copyright (c) 2011 by Randy Stauner.
it's free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. π
and that's the whole page, bestie!! π no notes, she ate. this was generated by perl v5.34.0 on 2022-06-13, so if you're reading this from the future... hi, hope you're hydrated π₯€π β¨ bye luv u β¨
π¦ where this page comes from
- debian bookworm: libdist-metadata-perl 0.927-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdist-metadata-perl 0.927-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdist-metadata-perl 0.927-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdist-metadata-perl 0.927-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdist-metadata-perl 0.927-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms