Softwa...eUtils(3pm)
π Software::LicenseMoreUtils π
okay bestie, gather round, because this is a 3pm page β that's User Contributed Perl Documentation β and it's about Software::LicenseMoreUtils, the module that's basically the cooler older sibling of Software::License. It's giving extra utilities + a license summary, and honestly? Obsessed.
β¨ NAME β¨
Software::LicenseMoreUtils β more utilities and a summary for Software::License. Periodt.
π VERSION π
version 1.009 (yes, the real number, no cap)
π§ 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' # unlike Software::License, holder is optional
});
# On Debian, return a license summary, returns license text elsewhere
# with ot without copyright notice, depending if holder is set.
my $text = $lic->summary_or_text;
# returns license full text
my $text = $lic->text;
πΈ DESCRIPTION πΈ
So this module hands you more utilities for Software::License. Here's the whole vibe check:
- The method
new_from_short_namereturns aSoftware::LicenseMoreUtils::LicenseWithSummaryobject β and that lil guy gives you all the functionalities</>, ofSoftware::License::*objects plus a summary on some Linux distribution (scroll down for that tea). new_from_short_nameaccepts more short names thanSoftware::LicenseUtilsdoes. Iconic behavior.new_from_short_namealso accepts the "or any later version" variant of GPL licenses. When you use a short name likeGPL-3+, the license summary contains the "or (at your option) any later version" statement. Slay.Software::License::LGPL-2is also provided. Even though the licenseLGPL-2.1is preferred overLGPL-2, some software in Debian usesLGPL-2. So we hold space for it. π«Ά
π License summary π
In some distributions like Debian, all packages should come with the full text of the licenses of the package software. Yes, all of them. The whole thing. π
To avoid many duplications of long license text, the text of the most common licenses is provided in the /usr/share/common-licenses directory. So instead of copy-pasting a whole novel, the license text of a package only needs to provide a summary of the license that refers to the location of the common license. Chef's kiss. π
All summaries are provided for Debian (so, for Ubuntu too π). Other distributions are welcome to send a pull request for their license summaries β the door is open, bestie.
π οΈ Methods π οΈ
β new_from_short_name β
my $license_object = Software::LicenseMoreUtils->new_from_short_name({
short_name => 'GPL-1', # mandatory
holder => 'X. Ample' # optional
}) ;
Unlike Software::License, the Holder parameter is optional. When it's set, summary_or_text in Software::LicenseMoreUtils::LicenseWithSummary returns a copyright notice together with the text of the summary of the license.
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, because all methods are delegated to the underlying Software::License object. No drama, no rewrites. π
Known short license names are GPL-*, LGPL-*, and their "or later version" variants GPL-*+, LGPL-*+, Artistic and Artistic-*. And unlike vanilla Software::License, this module accepts license names with - (e.g. GPL-2) along with _ (e.g. GPL_2). Both. We contain multitudes. π
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. iykyk β¨
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'). So it'll still try its best for you. π₯Ί
π AUTHOR π
Dominique Dumont (the main character who wrote all this)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2018, 2022 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.
π heads up bestie: this page is fromperl v5.34.0, dated2022-06-04. So if something's changed since then... that's between you and your CPAN mirror. π
okay bye love u, go summarize some licenses responsibly π¦π
π¦ where this page comes from
- debian bookworm: libsoftware-licensemoreutils-perl 1.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsoftware-licensemoreutils-perl 1.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsoftware-licensemoreutils-perl 1.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsoftware-licensemoreutils-perl 1.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsoftware-licensemoreutils-perl 1.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms