-
-
14 Jun 2022 21:45:48 UTC
- Distribution: Software-License
- Module version: 0.104002
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (1427 / 0 / 0)
- Kwalitee
Bus factor: 4- 89.57% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (121.99KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 36 contributors-
Ricardo Signes
-
Alex Kapranoff
-
Andrew Grangaard
-
Axel Beckert
-
Bernardo Rechea
-
Bernhard Amann
-
bowtie
-
Brian Cassidy
-
Brian Phillips
-
Craig Scrivner
-
Curtis Brandt
-
Dave Rolsky
-
David E. Wheeler
-
David Golden
-
Dominique Dumont
-
Dylan William Hardison
-
Flavio Poletti
-
Florian Ragwitz
-
Graham Knop
-
Justin Baker
-
Kang-min Liu
-
Karen Etheridge
-
Kenichi Ishigaki
-
Kivanc Yazan
-
magnolia
-
mikegrb
-
Neil Bowers
-
Nicolas Rochelemagne
-
Olivier Mengué
-
Pablo Rodríguez González
-
Shlomi Fish
-
srchulo
-
Syohei YOSHIDA
-
Tomasz Konojacki
-
Van de Bugger
-
Wesley Schwengle
NAME
Software::LicenseUtils - little useful bits of code for licensey things
VERSION
version 0.104002
PERL VERSION
This module is part of CPAN toolchain, or is treated as such. As such, it follows the agreement of the Perl Toolchain Gang to require no newer version of perl than v5.8.1. This version may change by agreement of the Toolchain Gang, but for now is governed by the Lancaster Consensus of 2013.
METHODS
guess_license_from_pod
my @guesses = Software::LicenseUtils->guess_license_from_pod($pm_text);
Given text containing POD, like a .pm file, this method will attempt to guess at the license under which the code is available. This method will return either a list of Software::License classes names (as strings) or false.
This method looks for a POD heading like 'license', 'copyright', or 'legal'.
Calling this method in scalar context is a fatal error.
guess_license_from_meta
my @guesses = Software::LicenseUtils->guess_license_from_meta($meta_str);
Given the content of the META.(yml|json) file found in a CPAN distribution, this method makes a guess as to which licenses may apply to the distribution. It will return a list of zero or more Software::License instances or classes.
guess_license_from_meta_key
my @guesses = Software::LicenseUtils->guess_license_from_meta_key($key, $v);
This method returns zero or more Software::License classes known to use
$key
as their META key. If$v
is supplied, it specifies whether to treat$key
as a v1 or v2 meta entry. Any value other than 1 or 2 will raise an exception.new_from_short_name
my $license_object = Software::LicenseUtils->new_from_short_name( { short_name => 'GPL-1', holder => 'X. Ample' }) ;
Create a new Software::License object from the license specified with
short_name
. Known short license names areGPL-*
,LGPL-*
,Artistic
andArtistic-*
new_from_spdx_expression
my $license_object = Software::LicenseUtils->new_from_spdx_expression( { spdx_expression => 'MPL-2.0', holder => 'X. Ample' }) ;
Create a new Software::License object from the license specified with
spdx_expression
. Some licenses doesn't have an spdx identifier (for example Software::License::Perl_5), so you can pass spdx identifier but also expressions. Known spdx license identifiers areBSD
,MPL-1.0
.AUTHOR
Ricardo Signes <rjbs@semiotic.systems>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Software::License, copy and paste the appropriate command in to your terminal.
cpanm Software::License
perl -MCPAN -e shell install Software::License
For more information on module installation, please visit the detailed CPAN module installation guide.