Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jul 26, 2022
1 parent f9cc52d commit c4cae36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Changes
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
6 changes: 3 additions & 3 deletions README.md
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

Expand All @@ -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/PackageURL@0.0.1
say $purl; # pkg:cpan/URI/PackageURL@0.0.1
# 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');
```
Expand Down
8 changes: 4 additions & 4 deletions lib/URI/PackageURL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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/PackageURL@0.0.1
say $purl; # pkg:cpan/URI/PackageURL@0.0.1
# 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');
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c4cae36

Please sign in to comment.