table of contents
| URI::PackageURL::Type(3pm) | User Contributed Perl Documentation | URI::PackageURL::Type(3pm) |
NAME¶
URI::PackageURL::Type - PURL type definition class for URI::PackageURL
SYNOPSIS¶
use URI::PackageURL::Type;
# Load 'cpan' PURL type definition
$type = URI::PackageURL::Type->new('cpan');
say $type->definition->{description};
DESCRIPTION¶
URL::PackageURL::Type is the PURL type definition helper for URL::PackageURL.
FUNCTIONAL INTERFACE¶
definition_dir
$path = URI::PackageURL::Type::definition_dir();
Return the local PURL type definitions directory.
OBJECT-ORIENTED INTERFACE¶
new
$purl_type = URI::PackageURL::Type->new($purl_type)
Create new URI::PackageURL::Type instance and load PURL type definition for normalization and validation.
$purl_type = URI::PackageURL::Type->new('cpan');
normalize
$purl_type->normalize(%components)
Perform PURL components normalization:
%components = $purl_type->normalize(
type => 'CPAN',
namespace => 'gdt',
name => 'URI-PackageURL'
);
say Dumper(\%components);
# {
# type => 'cpan',
# namespace => 'GDT',
# name => 'URI-PackageURL'
# }
validate
$purl_type->validate(%components)
Perform PURL components validation:
$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
Component definition
- $purl_type->namespace_definition
- $purl_type->name_definition
- $purl_type->version_definition
- $purl_type->qualifiers_definition
- $purl_type->subpath_definition
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)
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.
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.
| 2026-01-31 | perl v5.40.1 |