URI::P...L::Type(3pm)
π URI::PackageURL::Type π
okay bestie, this is the manual page for URI::PackageURL::Type, part of the User Contributed Perl Documentation for URI::PackageURL::Type(3pm) β and yes, it's the PURL type definition class for URI::PackageURL. Let's get into it β¨
πΈ NAME πΈ
URI::PackageURL::Type β the PURL type definition class for URI::PackageURL. it's giving "class that knows things about types" and honestly? iconic π
β¨ SYNOPSIS β¨
use URI::PackageURL::Type;
# Load 'cpan' PURL type definition
$type = URI::PackageURL::Type->new('cpan');
say $type->definition->{description};
like, you load a type definition, then you peek at its description. simple. clean. slay π«Ά
π¦ DESCRIPTION π¦
URL::PackageURL::Type is the PURL type definition helper for URL::PackageURL.
(yes, bestie, that's literally what it says β URL::PackageURL::Type and URL::PackageURL, no I, we are not editing the original text, that's the whole vibe of a manpage π)
π FUNCTIONAL INTERFACE π
definition_dir
$path = URI::PackageURL::Type::definition_dir();
hand it back the local PURL type definitions directory. that's it, that's the function π
π OBJECT-ORIENTED INTERFACE π
new
$purl_type = URI::PackageURL::Type->new($purl_type)
makes you a brand new URI::PackageURL::Type instance and loads up the PURL type definition so you can normalize and validate stuff. main character constructor energy β¨
$purl_type = URI::PackageURL::Type->new('cpan');
normalize
$purl_type->normalize(%components)
this one does the PURL components normalization, lowkey one of the best parts:
%components = $purl_type->normalize(
type => 'CPAN',
namespace => 'gdt',
name => 'URI-PackageURL'
);
say Dumper(\%components);
# {
# type => 'cpan',
# namespace => 'GDT',
# name => 'URI-PackageURL'
# }
look at that glow-up β CPAN became cpan, gdt became GDT π₯
validate
$purl_type->validate(%components)
does the PURL components validation. vibe check for your components, no cap:
$purl_type->validate(
type => 'CPAN',
name => 'URI-PackageURL'
);
Definition
$purl_type->schema_id
$purl_type->type_name
$purl_type->description
$purl_type->default_repository_url
$purl_type->examples
$purl_type->repository
$purl_type->note
$purl_type->reference_urls
all the definition accessors, lined up like a little squad π«Ά
Component definition
$purl_type->namespace_definition
$purl_type->name_definition
$purl_type->version_definition
$purl_type->qualifiers_definition
$purl_type->subpath_definition
one per component, because each one deserves its own moment π
Helpers
$purl_type->component_have_definition($component)
$purl_type->component_definition($component)
$purl_type->component_case_sensitive($component)
$purl_type->component_is_case_sensitive($component)
$purl_type->component_is_optional($component)
$purl_type->component_is_prohibited($component)
$purl_type->component_is_required($component)
$purl_type->component_native_name($component)
$purl_type->component_normalization_rules($component)
$purl_type->component_note($component)
$purl_type->component_permitted_characters($component)
$purl_type->component_requirement($component)
the helper squad, all taking $component. take notes bestie, there's twelve of them and we are not skipping any π§
π SUPPORT π
π Bugs / Feature Requests π
found a bug? want a feature? pls report them through the issue tracker at <https://github.com/giterlizzi/perl-URI-PackageURL/issues>. you'll get notified automatically of any progress on your issue, which is genuinely so nice of them π
π¦ Source Code π¦
this is open source software. the code repository is out there 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
clone it, bestie, go be part of the story β¨
π 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.
and that's the whole page, bestie π this was documented with perl v5.40.1 and dated 2026-01-31, so go forth and normalize your PURL types with main character confidence ππ¦ 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