Metaba...stfile(3pm)

πŸ“¦
version 0.025 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Metabase::Resource::cpan::distfile β€” it's a class for Metabase resources, bestie πŸ’–

(also, hi, this is a 3pm page β€” that's the User Contributed Perl Documentation zone, so you already know we're in perl-core-adjacent territory πŸ‘‘)


🌸 VERSION 🌸

version 0.025 β€” yes, that's the one, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so this is literally the whole vibe in four lines:

my $resource = Metabase::Resource->new(
  'cpan:///distfile/RJBS/Metabase-Fact-0.001.tar.gz',
);

my $resource_meta = $resource->metadata;
my $typemap       = $resource->metadata_types;

like. that's it. that's the whole thing. you make the resource, you grab the metadata, you grab the metadata_types, and you go live your life 🫢


πŸ’… DESCRIPTION πŸ’…

so what does this actually DO? it generates resource metadata for resources of the scheme 'cpan:///distfile'. that's the whole job. it's giving very focused, very specialist. main character energy but make it a URI scheme πŸŽ€

here's another example so you can see the shape of the thing:

my $resource = Metabase::Resource->new(
  'cpan:///distfile/RJBS/URI-cpan-1.000.tar.gz',
);

and for that example up there?? the resource metadata structure would contain these exact elements, no notes, no extras:

scheme       => cpan
type         => distfile
dist_file    => RJBS/URI-cpan-1.000.tar.gz
cpan_id      => RJBS
dist_name    => URI-cpan
dist_version => 1.000

see how it just. cracked the path open and pulled out every piece?? scheme, type, then dist_file keeps the whole RJBS/URI-cpan-1.000.tar.gz bit, and then cpan_id, dist_name and dist_version get sliced out of it. it's literally parsing for you so you don't have to. we love a delegation moment ⭐


πŸ’€ BUGS πŸ’€

found a bug? got a feature request? please report it using the CPAN Request Tracker. you can submit through the web interface at:

<http://rt.cpan.org/Dist/Display.html?Queue=Metabase-Fact>

and listen β€” when you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the desired feature. i'm not being dramatic, this is genuinely in the original and it genuinely helps πŸ™ˆ. a patch that SHOWS the problem >>> a paragraph describing the problem. periodt.


πŸ‘‘ AUTHORS πŸ‘‘

the icons who built this:

  • David Golden <dagolden@cpan.org>
  • Ricardo Signes <rjbs@cpan.org>
  • H.Merijn Brand <hmbrand@cpan.org>

three whole legends. we stan 🌈


This software is Copyright (c) 2016 by David Golden.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

so yeah, it's free, it's Apache 2.0, it's legal, it's fine πŸ’–


okay bestie that's the whole page β€” this was the perl v5.36.0 build, dated 2022-10-14, and it's the Metabase::Resource::cpan::distfile page from the User Contributed Perl Documentation set. go forth and parse distfiles, you absolute icon πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from