The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Software::LicenseMoreUtils - More utilities and a summary for Software::License

VERSION

version 1.006

SYNOPSIS

 use Software::LicenseMoreUtils;

 my $lic = Software::LicenseMoreUtils->new_from_short_name({
    short_name => 'Apache-2.0', # or GPL-2+, Artistic-2 ...
    holder => 'X. Ample'
 });

 # On Debian, return a license summary, returns license text elsewhere
 my $text = $lic->summary_or_text;

 # returns license full text
 my $text = $lic->text;

DESCRIPTION

This module provides more utilities for Software::License:

License summary

In some distribution like Debian, all packages should come with the full text of the licenses of the package software.

To avoid many duplication of long license text, the text of the most common licenses are provided in /usr/share/common-licenses directory. Then the license text of a package need only to provide a summary of the license that refer to the location of the common license.

All summaries are provided for Debian (so for Ubuntu). Other distributions are welcome to send pull request for their license summaries.

Methods

new_from_short_name

 my $license_object = Software::LicenseMoreUtils->new_from_short_name({
      short_name => 'GPL-1',
      holder => 'X. Ample'
 }) ;

Returns a new Software::LicenseMoreUtils::LicenseWithSummary object which is a Software::License wrapped with a summary. This is a drop-in replacement for the Software::License object as all methods are delegated to the underlying Software::License object.

Known short license names are GPL-*, LGPL-* , and their "or later version" variant GPL-*+, LGPL-*+ Artistic and Artistic-*. Unlike vanilla Software::License, this module accepts license name with "-" (e.g. GPL-2) along with "_" (e.g. "GPL_2").

SPDX v3 identifiers can also be used as short names. I.e. short names like GPL-2.0-only or LGPL-2.1-or-later are supported.

If the short name is not known, this method tries to create a license object with Software::License and the specified short name (e.g. Software::License::MIT with short_name => 'MIT' or Software::License::Apache_2_0 with short_name => 'Apache-2.0').

AUTHOR

Dominique Dumont

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Dominique Dumont.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.