#!/usr/bin/perl
use strict;
use utf8;
exit URI::PackageURL::App->run(@ARGV) unless caller();
1;
__END__
=encoding utf-8
=head1 NAME
purl-tool - Package URL tool
=head1 SYNOPSIS
purl-tool [OPTIONS]...STRING
purl-tool --type STRING [--namespace STRING] --name STRING [--version STRING] [--subpath STRING] [--qualifier KEY=VALUE [...]]
purl-tool [--help|--man|-v]
Options:
--help Brief help message
--man Full documentation
-v Print version
"purl" string encode options:
--type=STRING Type
--namespace=STRING Namespace (optional)
--name=STRING Name
--version=STRING Version (optional)
--qualifier KEY=VALUE Qualifier key-value (optional)
"purl" string decode options:
--download-url Download URL
--repository-url Repository URL
-0, --null Return NULL char instead of new line
--format=FORMAT Output format
--dumper Data::Dumper format (--format=dumper)
--json JSON output format (--format=json)
--yaml YAML output format (--format=yaml)
--env ENV output format (--format=env)
Examples:
Parse the given Package URL string and return JSON and send the STDOUT to jq:
purl-tool pkg:cpan/GDT/URI-PackageURL@2.11 --json | jq
Download the package from the repository using Package URL string:
wget $(purl-tool pkg:cpan/GDT/URI-PackageURL@2.11 --download-url)
Create a canonical Package URL string
purl-tool --type cpan \
--namespace GDT \
--name URI-PackageURL \
--version 2.11
=head1 DESCRIPTION
C<purl-tool> Package URL tool
=head1 EXAMPLES
Parse the given Package URL string and return JSON and send the STDOUT to L<jq>:
purl-tool pkg:cpan/GDT/URI-PackageURL@2.11 --json | jq
Download the package from the repository using Package URL string:
wget $(purl-tool pkg:cpan/GDT/URI-PackageURL@2.11 --download-url)
Create a canonical Package URL string:
purl-tool --type cpan \
--namespace GDT \
--name URI-PackageURL \
--version 2.11
=head1 AUTHOR
L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>
=head1 COPYRIGHT AND LICENSE
Copyright © 2022-2024 L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>
You may use and distribute this module according to the same terms
that Perl is distributed under.