1Software::LicenseUtils(U3s)er Contributed Perl DocumentatSioofntware::LicenseUtils(3)
2
3
4

NAME

6       Software::LicenseUtils - little useful bits of code for licensey things
7

VERSION

9       version 0.104004
10

PERL VERSION

12       This module is part of CPAN toolchain, or is treated as such.  As such,
13       it follows the agreement of the Perl Toolchain Gang to require no newer
14       version of perl than one released in the last ten years.  This version
15       may change by agreement of the Toolchain Gang, but for now is governed
16       by the Lancaster Consensus <https://github.com/Perl-Toolchain-
17       Gang/toolchain-site/blob/master/lancaster-consensus.md> of 2013 and the
18       Lyon Amendment of 2023 (described at the linked-to document).
19
20       Although it may work on older versions of perl, no guarantee is made
21       that the minimum required version will not be increased.  The version
22       may be increased for any reason, and there is no promise that patches
23       will be accepted to lower the minimum required perl.
24

METHODS

26   guess_license_from_pod
27         my @guesses = Software::LicenseUtils->guess_license_from_pod($pm_text);
28
29       Given text containing POD, like a .pm file, this method will attempt to
30       guess at the license under which the code is available.  This method
31       will return either a list of Software::License classes names (as
32       strings) or false.
33
34       This method looks for a POD heading like 'license', 'copyright', or
35       'legal'.
36
37       Calling this method in scalar context is a fatal error.
38
39   guess_license_from_meta
40         my @guesses = Software::LicenseUtils->guess_license_from_meta($meta_str);
41
42       Given the content of the META.(yml|json) file found in a CPAN
43       distribution, this method makes a guess as to which licenses may apply
44       to the distribution.  It will return a list of zero or more
45       Software::License instances or classes.
46
47   guess_license_from_meta_key
48         my @guesses = Software::LicenseUtils->guess_license_from_meta_key($key, $v);
49
50       This method returns zero or more Software::License classes known to use
51       $key as their META key.  If $v is supplied, it specifies whether to
52       treat $key as a v1 or v2 meta entry.  Any value other than 1 or 2 will
53       raise an exception.
54
55   new_from_short_name
56         my $license_object = Software::LicenseUtils->new_from_short_name( {
57            short_name => 'GPL-1',
58            holder => 'X. Ample'
59         }) ;
60
61       Create a new Software::License object from the license specified with
62       "short_name". Known short license names are "GPL-*", "LGPL-*" ,
63       "Artistic" and "Artistic-*"
64
65   new_from_spdx_expression
66         my $license_object = Software::LicenseUtils->new_from_spdx_expression( {
67            spdx_expression => 'MPL-2.0',
68            holder => 'X. Ample'
69         }) ;
70
71       Create a new Software::License object from the license specified with
72       "spdx_expression". Some licenses doesn't have an spdx identifier (for
73       example Software::License::Perl_5), so you can pass spdx identifier but
74       also expressions.  Known spdx license identifiers are "BSD", "MPL-1.0".
75

AUTHOR

77       Ricardo Signes <rjbs@semiotic.systems>
78
80       This software is copyright (c) 2023 by Ricardo Signes.
81
82       This is free software; you can redistribute it and/or modify it under
83       the same terms as the Perl 5 programming language system itself.
84
85
86
87perl v5.38.0                      2023-07-21         Software::LicenseUtils(3)
Impressum