URI::P...L::Util(3pm)

πŸ“¦
version 2.25 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 (*): YES
  • cargo β€” Repository: YES Β· Download (*): YES
  • composer β€” Repository: YES Β· Download (*): NO
  • cpan β€” Repository: YES Β· Download (*): YES
  • docker β€” Repository: YES Β· Download (*): NO
  • gem β€” Repository: YES Β· Download (*): YES
  • generic β€” Repository: NO Β· Download (*): YES (**)
  • github β€” Repository: YES Β· Download (*): YES
  • gitlab β€” Repository: YES Β· Download (*): YES
  • luarocks β€” Repository: YES Β· Download (*): NO
  • maven β€” Repository: YES Β· Download (*): YES
  • npm β€” Repository: YES Β· Download (*): YES
  • nuget β€” Repository: YES Β· Download (*): YES
  • pypi β€” 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_url qualifier 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>

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