-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9cc52d
commit c4cae36
Showing
3 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
Revision history for Perl extension URI::PackageURL. | ||
|
||
1.01 2022-07-26 | ||
- Fix documentation and test prerequisite (JSON::PP) | ||
|
||
1.00 2022-07-25 | ||
- First release of URI::PackageURL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[![Release](https://img.shields.io/github/release/giterlizzi/perl-URI-PackageURL.svg)](https://github.com/giterlizzi/perl-URI-PackageURL/releases) [![Actions Status](https://github.com/giterlizzi/perl-URI-PackageURL/workflows/linux/badge.svg)](https://github.com/giterlizzi/perl-URI-PackageURL/actions) [![Actions Status](https://github.com/giterlizzi/perl-URI-PackageURL/workflows/macos/badge.svg)](https://github.com/giterlizzi/perl-URI-PackageURL/actions) [![License](https://img.shields.io/github/license/giterlizzi/perl-URI-PackageURL.svg)](https://github.com/giterlizzi/perl-URI-PackageURL) [![Starts](https://img.shields.io/github/stars/giterlizzi/perl-URI-PackageURL.svg)](https://github.com/giterlizzi/perl-URI-PackageURL) [![Forks](https://img.shields.io/github/forks/giterlizzi/perl-URI-PackageURL.svg)](https://github.com/giterlizzi/perl-URI-PackageURL) [![Issues](https://img.shields.io/github/issues/giterlizzi/perl-URI-PackageURL.svg)](https://github.com/giterlizzi/perl-URI-PackageURL/issues) [![Coverage Status](https://coveralls.io/repos/github/giterlizzi/perl-URI-PackageURL/badge.svg)](https://coveralls.io/github/giterlizzi/perl-URI-PackageURL) | ||
|
||
# URI::PackageURL - Perl for Package URL (aka "purl") | ||
# URI::PackageURL - Perl extension for Package URL (aka "purl") | ||
|
||
## Synopsis | ||
|
||
|
@@ -12,15 +12,15 @@ use URI::PackageURL; | |
# Encode components in PackageURL string | ||
$purl = URI::PackageURL->new(type => cpan, namespace => 'URI', name => 'PackageURL', version => 1.00'); | ||
say $purl // pkg:cpan/URI/[email protected] | ||
say $purl; # pkg:cpan/URI/[email protected] | ||
# Parse PackageURL string | ||
$purl = URI::PackageURL->from_string('pkg:cpan/URI/PackageURL@0.0.1'); | ||
# exported funtions | ||
$purl = decode_purl('pkg:cpan/URI/PackageURL@0.0.1'); | ||
say $purl->type; // cpan | ||
say $purl->type; # cpan | ||
$purl_string = encode_purl(type => cpan, namespace => 'URI', name => 'PackageURL', version => 1.00'); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ use constant DEBUG => $ENV{PURL_DEBUG}; | |
|
||
use overload '""' => 'to_string', fallback => 1; | ||
|
||
our $VERSION = '1.00'; | ||
our $VERSION = '1.01'; | ||
|
||
our @EXPORT = qw(encode_purl decode_purl); | ||
|
||
|
@@ -317,15 +317,15 @@ URI::PackageURL - Perl extension for Package URL (aka "purl") | |
# Encode components in PackageURL string | ||
$purl = URI::PackageURL->new(type => cpan, namespace => 'URI', name => 'PackageURL', version => 1.00'); | ||
say $purl // pkg:cpan/URI/[email protected] | ||
say $purl; # pkg:cpan/URI/[email protected] | ||
# Parse PackageURL string | ||
$purl = URI::PackageURL->from_string('pkg:cpan/URI/[email protected]'); | ||
# exported funtions | ||
$purl = decode_purl('pkg:cpan/URI/[email protected]'); | ||
say $purl->type; // cpan | ||
say $purl->type; # cpan | ||
$purl_string = encode_purl(type => cpan, namespace => 'URI', name => 'PackageURL', version => 1.00'); | ||
|
@@ -439,7 +439,7 @@ Helper method for JSON modules (L<JSON>, L<JSON::PP>, L<JSON::XS>, L<Mojo::JSON> | |
use Mojo::JSON qw(encode_json); | ||
say encode_json($purl); // {"name":"PackageURL","namespace":"URI","qualifiers":null,"subpath":null,"type":"cpan","version":"0.0.1"} | ||
say encode_json($purl); # {"name":"PackageURL","namespace":"URI","qualifiers":null,"subpath":null,"type":"cpan","version":"0.0.1"} | ||
=back | ||
|