Scroll to navigation

Software::LicenseMoreUtils(3pm) User Contributed Perl Documentation Software::LicenseMoreUtils(3pm)

NAME

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

VERSION

version 1.004

SYNOPSIS

 use Software::LicenseMoreUtils;

 my $lic = Software::LicenseMoreUtils->new_from_short_name({
    short_name => 'Apache-2.0',
    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:
  • Method "new_from_short_name" returns a Software::LicenseMoreUtils::LicenseWithSummary object that provides all functionalities of "Software::License::*" objects and a summary on some Linux distribution (see below).
  • "new_from_short_name" accepts more short names than Software::LicenseUtils
  • Software::License::LGPL-2 license is also provided. Even though license "LGPL-2.1" is preferred over "LGPL-2", some software in Debian use "LGPL-2".

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.

The new Software::License object is created from the license specified with "short_name". Known short license names are "GPL-*", "LGPL-*" , "Artistic" and "Artistic-*" "Artistic" and "Artistic-*". If the short name is not known, this method will try 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 => 'Apapche-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.

2018-11-03 perl v5.28.0