1String::License::NamingU:s:eSrPDCXo(n3t)ributed Perl DocSutmreinntga:t:iLoincense::Naming::SPDX(3)
2
3
4
6 String::License::Naming::SPDX - licenses as named by SPDX
7
9 Version v0.0.4
10
12 use String::License::Naming::SPDX;
13
14 my $spdx = String::License::Naming::SPDX->new;
15
16 my $license = [ grep { /^(Expat|Perl)$/ } $spdx->list_licenses ]; # => is_deeply ['Perl']
17
19 String::License::Naming enumerates supported licenses matching an
20 ordered set of naming schemes, or enumerates the names of supported
21 license naming schemes.
22
23 Some licenses are known by different names. E.g. the license "MIT"
24 according to SPDX is named "Expat" in Debian.
25
26 Some licenses are not always represented. E.g. "Perl" is a
27 (discouraged) license in Debian while it is a relationship of several
28 licenses with SPDX (and that expression is recommended in Debian as
29 well).
30
31 By default, licenses are matched using naming schemes "[ 'spdx',
32 'internal' ]", which lists all supported licenses, preferrably by their
33 SPDX name or as fallback by an internal name.
34
36 new Constructs and returns a String::License::Naming object.
37
38 Includes all licenses defined by SPDX, and presents them by their
39 SPDX shortname.
40
42 list_schemes
43 Returns a list of license naming schemes in use.
44
45 list_licenses
46 Returns a list of all licensing patterns covered by SPDX, each
47 labeled by SPDX shortname.
48
50 Jonas Smedegaard "<dr@jones.dk>"
51
53 Copyright © 2023 Jonas Smedegaard
54
55 This program is free software: you can redistribute it and/or modify it
56 under the terms of the GNU Affero General Public License as published
57 by the Free Software Foundation, either version 3, or (at your option)
58 any later version.
59
60 This program is distributed in the hope that it will be useful, but
61 WITHOUT ANY WARRANTY; without even the implied warranty of
62 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63 Affero General Public License for more details.
64
65 You should have received a copy of the GNU Affero General Public
66 License along with this program. If not, see
67 <https://www.gnu.org/licenses/>.
68
70 Hey! The above document had some coding errors, which are explained
71 below:
72
73 Around line 90:
74 '=item' outside of any '=over'
75
76
77
78perl v5.36.0 2023-01-29 String::License::Naming::SPDX(3)