Release Actions Status License Starts Forks Issues Coverage Status

URI::PackageURL - Perl extension for Package URL (aka "purl")

Synopsis

use URI::PackageURL;

# OO-interface

# Encode components in PackageURL string
$purl = URI::PackageURL->new(type => cpan, namespace => 'GDT', name => 'URI-PackageURL', version => '2.00');

say $purl; # pkg:cpan/GDT/URI-PackageURL@2.00

# Parse PackageURL string
$purl = URI::PackageURL->from_string('pkg:cpan/GDT/URI-PackageURL@2.00');

# exported funtions

$purl = decode_purl('pkg:cpan/GDT/URI-PackageURL@2.00');
say $purl->type;  # cpan

$purl_string = encode_purl(type => cpan, namespace => 'GDT', name => 'URI::PackageURL', version => '2.00');

Install

Using Makefile.PL:

To install URI::PackageURL distribution, run the following commands.

perl Makefile.PL
make
make test
make install

Using App::cpanminus:

cpanm URI::PackageURL

Documentation