URI::P...L::Util(3pm)
π URI::PackageURL::Util π
okay bestie, so this page is from the User Contributed Perl Documentation and it's literally the URI::P...L::Util(3pm) situation β yes the name has dots in it, that's the vibe, iykyk β¨
β¨ NAME β¨
URI::PackageURL::Util β the utility for URI::PackageURL π
πΈ SYNOPSIS πΈ
use URI::PackageURL::Util qw(purl_to_urls);
$urls = purl_to_urls('pkg:cpan/GDT/URI-PackageURL@2.25');
$filename = basename($urls->{download});
$ua->mirror($urls->{download}, "/tmp/$filename");
π¦ DESCRIPTION π¦
URL::PackageURL::Util is the utility package for URL::PackageURL. (yes those are the names, don't @ me, I'm reporting them exactly as they are π
)
π EXPORTED FUNCTIONS π
π purl_types
use URI::PackageURL::Util qw(purl_types);
@types = purl_types();
Returns the list of known PURL types. that's it, that's the whole job, and she does it beautifully π
π purl_to_urls
use URI::PackageURL::Util qw(purl_to_urls);
$urls = purl_to_urls($purl_string // URI::PackageURL->new(...));
Converts the given Package URL string or a URI::PackageURL instance, and hands back a hash with "repository" and/or "download" URL. iconic behavior, no notes. π
NOTE: This utility support few PURL types β"bitbucket","cargo","composer","cpan","docker","gem","github","gitlab","luarocks","maven","npm","nuget","pypi".
here's the whole rundown of which type gives you what, bestie β repository vs download, one by one, zero gatekeeping:
bitbucketβ Repository: YES Β· Download (*): YEScargoβ Repository: YES Β· Download (*): YEScomposerβ Repository: YES Β· Download (*): NOcpanβ Repository: YES Β· Download (*): YESdockerβ Repository: YES Β· Download (*): NOgemβ Repository: YES Β· Download (*): YESgenericβ Repository: NO Β· Download (*): YES (**)githubβ Repository: YES Β· Download (*): YESgitlabβ Repository: YES Β· Download (*): YESluarocksβ Repository: YES Β· Download (*): NOmavenβ Repository: YES Β· Download (*): YESnpmβ Repository: YES Β· Download (*): YESnugetβ Repository: YES Β· Download (*): YESpypiβ Repository: YES Β· Download (*): NO
the little asterisks mean things, don't skip them, they're important fr fr:
- (*) Only with version component
- (**) Only if
download_urlqualifier is provided
now watch her work π
$urls = purl_to_urls('pkg:cpan/GDT/URI-PackageURL@2.25');
print Dumper($urls);
# $VAR1 = {
# 'repository' => 'https://metacpan.org/release/GDT/URI-PackageURL-2.25',
# 'download' => 'http://www.cpan.org/authors/id/G/GD/GDT/URI-PackageURL-2.25.tar.gz'
# };
π«Ά SUPPORT π«Ά
π Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker at <https://github.com/giterlizzi/perl-URI-PackageURL/issues>. You will be notified automatically of any progress on your issue. so like, you'll know, bestie, you won't be left on read. π¬
π Source Code
This is open source software. The code repository is available for public review and contribution under the terms of the license.
<https://github.com/giterlizzi/perl-URI-PackageURL>
git clone https://github.com/giterlizzi/perl-URI-PackageURL.git
β AUTHOR β
- Giuseppe Di Terlizzi
<gdt@cpan.org>
π LICENSE AND COPYRIGHT π
This software is copyright (c) 2022-2026 by Giuseppe Di Terlizzi.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. π
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
Around line 523:
=back without =over
not the =back without =over jumping out π we still love her though
and that's the whole page, gorgeous β this was perl v5.40.1, dated 2026-01-31, filed under URI::P...L::Util(3pm). periodt. π
β¨
π¦ where this page comes from
- ubuntu resolute: liburi-packageurl-perl 2.25-1 Β· Artistic-2.0
- ubuntu stonking: liburi-packageurl-perl 2.25-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms