Software::LicenseMoreUtils - More utilities and a summary for Software::License
version 0.005
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;
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).
Software::License::*
"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.
LGPL-2.1
LGPL-2
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.
/usr/share/common-licenses
All summaries are provided for Debian (so for Ubuntu). Other distributions are welcome to send pull request for their license summaries.
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').
short_name
GPL-*
LGPL-*
Artistic
Artistic-*
Software::License::
Software::License::MIT
short_name => 'MIT'
Software::License::Apache_2_0
short_name => 'Apapche-2.0'
Dominique Dumont
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.
To install Software::LicenseMoreUtils, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Software::LicenseMoreUtils
CPAN shell
perl -MCPAN -e shell install Software::LicenseMoreUtils
For more information on module installation, please visit the detailed CPAN module installation guide.