SPDX

NAME

License::SPDX - Abstraction over the https://spdx.org/licenses/

SYNOPSIs


use License::SPDX;

my $l = License::SPDX.new;

if $l.get-license('Artistic-2.0') -> $license {
	pass "licence is good";
	if $license.is-deprecated-license {
		warn "deprecated licence";
    }
}
else {
	flunk "not a good licence";
}

DESCRIPTION

This provides an abstraction over the SPDX License List as provided in JSON format Its primary raison d'รชtre is to help the licence checking of https://github.com/jonathanstowe/Test-META and to allow for the warning about deprecated licences therein.

The intention is to update this with a new license list (and up the version,) every time the SPDX list is updated.

ATTRIBUTES

Str $.license-list-version

This is the version of the license list being used.

Data $.release-date

This is the date that this release of the license list was generated.

License @.licenses

This is a list of the License::SPDX::License objects from the list.

License::SPDX::License

reference

Reference to the HTML format for the license file. This is relative to the license file repository root.

is-deprecated-license

True if the entire license is deprecated.

details-url

URL to a JSON file containing the license detailed information. This may be relative to the source of the JSON list.

reference-number

Generated number

name

License name

license-id

License identifier - this is the common identifier that should be used in the META6 license field.

see-also

A list of cross reference URL pointing to additional copies of the license.

is-osi-approved

A Bool that indicates if the OSI has approved the license

METHODS

method get-license

method get-license( Str:D $id --> License )

This returns the License object identified by the supplied id or a License type object if it isn't found.

License::SPDX v3.17.1

The SPDX licence list

Authors

  • Jonathan Stowe

License

Artistic-2.0

Dependencies

JSON::Class:ver<0.0.14+>

Test Dependencies

Provides

  • License::SPDX

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.