Metaba...stfile(3pm)
β¨ 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 π
π COPYRIGHT AND LICENSE π
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
- ubuntu noble: libmetabase-fact-perl 0.025-4 Β· Apache-2.0
- ubuntu resolute: libmetabase-fact-perl 0.025-4 Β· Apache-2.0
- ubuntu stonking: libmetabase-fact-perl 0.025-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms