line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
15
|
|
|
15
|
|
76600
|
use strict; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
319
|
|
2
|
15
|
|
|
15
|
|
56
|
use warnings; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
256
|
|
3
|
15
|
|
|
15
|
|
321
|
use 5.006; # warnings |
|
15
|
|
|
|
|
40
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: packages that provide templated software licenses |
5
|
|
|
|
|
|
|
$Software::License::VERSION = '0.104002'; |
6
|
|
|
|
|
|
|
use Data::Section -setup => { header_re => qr/\A__([^_]+)__\Z/ }; |
7
|
15
|
|
|
15
|
|
5400
|
use Text::Template (); |
|
15
|
|
|
|
|
349508
|
|
|
15
|
|
|
|
|
163
|
|
8
|
15
|
|
|
15
|
|
22116
|
|
|
15
|
|
|
|
|
49330
|
|
|
15
|
|
|
|
|
8262
|
|
9
|
|
|
|
|
|
|
#pod =head1 SYNOPSIS |
10
|
|
|
|
|
|
|
#pod |
11
|
|
|
|
|
|
|
#pod my $license = Software::License::Discordian->new({ |
12
|
|
|
|
|
|
|
#pod holder => 'Ricardo Signes', |
13
|
|
|
|
|
|
|
#pod }); |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod print $output_fh $license->fulltext; |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod =method new |
18
|
|
|
|
|
|
|
#pod |
19
|
|
|
|
|
|
|
#pod my $license = $subclass->new(\%arg); |
20
|
|
|
|
|
|
|
#pod |
21
|
|
|
|
|
|
|
#pod This method returns a new license object for the given license class. Valid |
22
|
|
|
|
|
|
|
#pod arguments are: |
23
|
|
|
|
|
|
|
#pod |
24
|
|
|
|
|
|
|
#pod =for :list |
25
|
|
|
|
|
|
|
#pod = holder |
26
|
|
|
|
|
|
|
#pod the holder of the copyright; required |
27
|
|
|
|
|
|
|
#pod = year |
28
|
|
|
|
|
|
|
#pod the year of copyright; defaults to current year |
29
|
|
|
|
|
|
|
#pod = program |
30
|
|
|
|
|
|
|
#pod the name of software for use in the middle of a sentence |
31
|
|
|
|
|
|
|
#pod = Program |
32
|
|
|
|
|
|
|
#pod the name of software for use in the beginning of a sentence |
33
|
|
|
|
|
|
|
#pod |
34
|
|
|
|
|
|
|
#pod C<program> and C<Program> arguments may be specified both, either one or none. |
35
|
|
|
|
|
|
|
#pod Each argument, if not specified, is defaulted to another one, or to properly |
36
|
|
|
|
|
|
|
#pod capitalized "this program", if both arguments are omitted. |
37
|
|
|
|
|
|
|
#pod |
38
|
|
|
|
|
|
|
#pod =cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my ($class, $arg) = @_; |
41
|
|
|
|
|
|
|
|
42
|
52
|
|
|
52
|
1
|
44678
|
Carp::croak "no copyright holder specified" unless $arg->{holder}; |
43
|
|
|
|
|
|
|
|
44
|
52
|
50
|
|
|
|
197
|
bless $arg => $class; |
45
|
|
|
|
|
|
|
} |
46
|
52
|
|
|
|
|
207
|
|
47
|
|
|
|
|
|
|
#pod =method year |
48
|
|
|
|
|
|
|
#pod |
49
|
|
|
|
|
|
|
#pod =method holder |
50
|
|
|
|
|
|
|
#pod |
51
|
|
|
|
|
|
|
#pod These methods are attribute readers. |
52
|
|
|
|
|
|
|
#pod |
53
|
|
|
|
|
|
|
#pod =cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $holder = $_[0]->holder; |
57
|
56
|
100
|
|
56
|
1
|
29679
|
$holder =~ s/\.$//; |
58
|
58
|
|
|
58
|
1
|
1569
|
return $holder; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
45
|
|
|
45
|
|
3188
|
#pod =method program |
62
|
45
|
|
|
|
|
226
|
#pod |
63
|
45
|
|
|
|
|
263
|
#pod Name of software for using in the middle of a sentence. |
64
|
|
|
|
|
|
|
#pod |
65
|
|
|
|
|
|
|
#pod The method returns value of C<program> constructor argument (if it evaluates as true, i. e. |
66
|
|
|
|
|
|
|
#pod defined, non-empty, non-zero), or value of C<Program> constructor argument (if it is true), or |
67
|
|
|
|
|
|
|
#pod "this program" as the last resort. |
68
|
|
|
|
|
|
|
#pod |
69
|
|
|
|
|
|
|
#pod =cut |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#pod =method Program |
73
|
|
|
|
|
|
|
#pod |
74
|
|
|
|
|
|
|
#pod Name of software for using in the middle of a sentence. |
75
|
|
|
|
|
|
|
#pod |
76
|
4
|
100
|
100
|
4
|
1
|
51
|
#pod The method returns value of C<Program> constructor argument (if it is true), or value of C<program> |
77
|
|
|
|
|
|
|
#pod constructor argument (if it is true), or "This program" as the last resort. |
78
|
|
|
|
|
|
|
#pod |
79
|
|
|
|
|
|
|
#pod =cut |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
#pod =method name |
83
|
|
|
|
|
|
|
#pod |
84
|
|
|
|
|
|
|
#pod This method returns the name of the license, suitable for shoving in the middle |
85
|
|
|
|
|
|
|
#pod of a sentence, generally with a leading capitalized "The." |
86
|
|
|
|
|
|
|
#pod |
87
|
4
|
100
|
100
|
4
|
1
|
32
|
#pod =method url |
88
|
|
|
|
|
|
|
#pod |
89
|
|
|
|
|
|
|
#pod This method returns the URL at which a canonical text of the license can be |
90
|
|
|
|
|
|
|
#pod found, if one is available. If possible, this will point at plain text, but it |
91
|
|
|
|
|
|
|
#pod may point to an HTML resource. |
92
|
|
|
|
|
|
|
#pod |
93
|
|
|
|
|
|
|
#pod =method notice |
94
|
|
|
|
|
|
|
#pod |
95
|
|
|
|
|
|
|
#pod This method returns a snippet of text, usually a few lines, indicating the |
96
|
|
|
|
|
|
|
#pod copyright holder and year of copyright, as well as an indication of the license |
97
|
|
|
|
|
|
|
#pod under which the software is distributed. |
98
|
|
|
|
|
|
|
#pod |
99
|
|
|
|
|
|
|
#pod =cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
#pod =method license |
103
|
|
|
|
|
|
|
#pod |
104
|
|
|
|
|
|
|
#pod This method returns the full text of the license. |
105
|
|
|
|
|
|
|
#pod |
106
|
|
|
|
|
|
|
#pod =cut |
107
|
|
|
|
|
|
|
|
108
|
46
|
|
|
46
|
1
|
339
|
|
109
|
|
|
|
|
|
|
#pod =method fulltext |
110
|
|
|
|
|
|
|
#pod |
111
|
|
|
|
|
|
|
#pod This method returns the complete text of the license, preceded by the copyright |
112
|
|
|
|
|
|
|
#pod notice. |
113
|
|
|
|
|
|
|
#pod |
114
|
|
|
|
|
|
|
#pod =cut |
115
|
|
|
|
|
|
|
|
116
|
36
|
|
|
36
|
1
|
26479
|
my ($self) = @_; |
117
|
|
|
|
|
|
|
return join "\n", $self->notice, $self->license; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
#pod =method version |
121
|
|
|
|
|
|
|
#pod |
122
|
|
|
|
|
|
|
#pod This method returns the version of the license. If the license is not |
123
|
|
|
|
|
|
|
#pod versioned, this method will return false. |
124
|
|
|
|
|
|
|
#pod |
125
|
|
|
|
|
|
|
#pod =cut |
126
|
8
|
|
|
8
|
1
|
19
|
|
127
|
8
|
|
|
|
|
43
|
my ($self) = @_; |
128
|
|
|
|
|
|
|
my $pkg = ref $self ? ref $self : $self; |
129
|
|
|
|
|
|
|
$pkg =~ s/.+:://; |
130
|
|
|
|
|
|
|
my (undef, @vparts) = split /_/, $pkg; |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
return unless @vparts; |
133
|
|
|
|
|
|
|
return join '.', @vparts; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
#pod =method meta_name |
137
|
|
|
|
|
|
|
#pod |
138
|
0
|
|
|
0
|
1
|
0
|
#pod This method returns the string that should be used for this license in the CPAN |
139
|
0
|
0
|
|
|
|
0
|
#pod META.yml file, according to the CPAN Meta spec v1, or undef if there is no |
140
|
0
|
|
|
|
|
0
|
#pod known string to use. |
141
|
0
|
|
|
|
|
0
|
#pod |
142
|
|
|
|
|
|
|
#pod This method may also be invoked as C<meta_yml_name> for legacy reasons. |
143
|
0
|
0
|
|
|
|
0
|
#pod |
144
|
0
|
|
|
|
|
0
|
#pod =method meta2_name |
145
|
|
|
|
|
|
|
#pod |
146
|
|
|
|
|
|
|
#pod This method returns the string that should be used for this license in the CPAN |
147
|
|
|
|
|
|
|
#pod META.json or META.yml file, according to the CPAN Meta spec v2, or undef if |
148
|
|
|
|
|
|
|
#pod there is no known string to use. If this method does not exist, and |
149
|
|
|
|
|
|
|
#pod C<meta_name> returns open_source, restricted, unrestricted, or unknown, that |
150
|
|
|
|
|
|
|
#pod value will be used. |
151
|
|
|
|
|
|
|
#pod |
152
|
|
|
|
|
|
|
#pod =cut |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
# sub meta1_name { return undef; } # sort this out later, should be easy |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
my ($self) = @_; |
157
|
|
|
|
|
|
|
my $meta1 = $self->meta_name; |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
return undef unless defined $meta1; |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
return $meta1 |
162
|
|
|
|
|
|
|
if $meta1 =~ /\A(?:open_source|restricted|unrestricted|unknown)\z/; |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
return undef; |
165
|
|
|
|
|
|
|
} |
166
|
0
|
|
|
0
|
1
|
0
|
|
167
|
0
|
|
|
0
|
0
|
0
|
#pod =method spdx_expression |
168
|
|
|
|
|
|
|
#pod |
169
|
|
|
|
|
|
|
#pod This method should return the string with the spdx identifier as indicated by |
170
|
0
|
|
|
0
|
1
|
0
|
#pod L<https://spdx.org/licenses/> |
171
|
0
|
|
|
|
|
0
|
#pod |
172
|
|
|
|
|
|
|
#pod =cut |
173
|
0
|
0
|
|
|
|
0
|
|
174
|
|
|
|
|
|
|
|
175
|
0
|
0
|
|
|
|
0
|
my ($self, $which) = @_; |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Carp::confess "couldn't build $which section" unless |
178
|
0
|
|
|
|
|
0
|
my $template = $self->section_data($which); |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
return Text::Template->fill_this_in( |
181
|
|
|
|
|
|
|
$$template, |
182
|
|
|
|
|
|
|
HASH => { self => \$self }, |
183
|
|
|
|
|
|
|
DELIMITERS => [ qw({{ }}) ], |
184
|
|
|
|
|
|
|
); |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
#pod =head1 LOOKING UP LICENSE CLASSES |
188
|
21
|
|
|
21
|
1
|
55
|
#pod |
189
|
|
|
|
|
|
|
#pod If you have an entry in a F<META.yml> or F<META.json> file, or similar |
190
|
|
|
|
|
|
|
#pod metadata, and want to look up the Software::License class to use, there are |
191
|
113
|
|
|
113
|
|
275
|
#pod useful tools in L<Software::LicenseUtils>. |
192
|
|
|
|
|
|
|
#pod |
193
|
113
|
50
|
|
|
|
488
|
#pod =head1 TODO |
194
|
|
|
|
|
|
|
#pod |
195
|
|
|
|
|
|
|
#pod =for :list |
196
|
92
|
|
|
|
|
356155
|
#pod * register licenses with aliases to allow $registry->get('gpl', 2); |
197
|
|
|
|
|
|
|
#pod |
198
|
|
|
|
|
|
|
#pod =head1 SEE ALSO |
199
|
|
|
|
|
|
|
#pod |
200
|
|
|
|
|
|
|
#pod The specific license: |
201
|
|
|
|
|
|
|
#pod |
202
|
|
|
|
|
|
|
#pod =for :list |
203
|
|
|
|
|
|
|
#pod * L<Software::License::AGPL_3> |
204
|
|
|
|
|
|
|
#pod * L<Software::License::Apache_1_1> |
205
|
|
|
|
|
|
|
#pod * L<Software::License::Apache_2_0> |
206
|
|
|
|
|
|
|
#pod * L<Software::License::Artistic_1_0> |
207
|
|
|
|
|
|
|
#pod * L<Software::License::Artistic_2_0> |
208
|
|
|
|
|
|
|
#pod * L<Software::License::BSD> |
209
|
|
|
|
|
|
|
#pod * L<Software::License::CC0_1_0> |
210
|
|
|
|
|
|
|
#pod * L<Software::License::Custom> |
211
|
|
|
|
|
|
|
#pod * L<Software::License::EUPL_1_1> |
212
|
|
|
|
|
|
|
#pod * L<Software::License::EUPL_1_2> |
213
|
|
|
|
|
|
|
#pod * L<Software::License::FreeBSD> |
214
|
|
|
|
|
|
|
#pod * L<Software::License::GFDL_1_2> |
215
|
|
|
|
|
|
|
#pod * L<Software::License::GFDL_1_3> |
216
|
|
|
|
|
|
|
#pod * L<Software::License::GPL_1> |
217
|
|
|
|
|
|
|
#pod * L<Software::License::GPL_2> |
218
|
|
|
|
|
|
|
#pod * L<Software::License::GPL_3> |
219
|
|
|
|
|
|
|
#pod * L<Software::License::LGPL_2_1> |
220
|
|
|
|
|
|
|
#pod * L<Software::License::LGPL_3_0> |
221
|
|
|
|
|
|
|
#pod * L<Software::License::MIT> |
222
|
|
|
|
|
|
|
#pod * L<Software::License::Mozilla_1_0> |
223
|
|
|
|
|
|
|
#pod * L<Software::License::Mozilla_1_1> |
224
|
|
|
|
|
|
|
#pod * L<Software::License::Mozilla_2_0> |
225
|
|
|
|
|
|
|
#pod * L<Software::License::None> |
226
|
|
|
|
|
|
|
#pod * L<Software::License::OpenSSL> |
227
|
|
|
|
|
|
|
#pod * L<Software::License::Perl_5> |
228
|
|
|
|
|
|
|
#pod * L<Software::License::PostgreSQL> |
229
|
|
|
|
|
|
|
#pod * L<Software::License::QPL_1_0> |
230
|
|
|
|
|
|
|
#pod * L<Software::License::SSLeay> |
231
|
|
|
|
|
|
|
#pod * L<Software::License::Sun> |
232
|
|
|
|
|
|
|
#pod * L<Software::License::Zlib> |
233
|
|
|
|
|
|
|
#pod |
234
|
|
|
|
|
|
|
#pod Extra licenses are maintained on CPAN in separate modules. |
235
|
|
|
|
|
|
|
#pod |
236
|
|
|
|
|
|
|
#pod The L<App::Software::License> module comes with a script |
237
|
|
|
|
|
|
|
#pod L<software-license|https://metacpan.org/pod/distribution/App-Software-License/script/software-license>, |
238
|
|
|
|
|
|
|
#pod which provides a command-line interface |
239
|
|
|
|
|
|
|
#pod to Software::License. |
240
|
|
|
|
|
|
|
#pod |
241
|
|
|
|
|
|
|
#pod =cut |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
1; |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=pod |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=encoding UTF-8 |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=head1 NAME |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
Software::License - packages that provide templated software licenses |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=head1 VERSION |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
version 0.104002 |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=head1 SYNOPSIS |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
my $license = Software::License::Discordian->new({ |
260
|
|
|
|
|
|
|
holder => 'Ricardo Signes', |
261
|
|
|
|
|
|
|
}); |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
print $output_fh $license->fulltext; |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=head1 PERL VERSION |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
This module is part of CPAN toolchain, or is treated as such. As such, it |
268
|
|
|
|
|
|
|
follows the agreement of the Perl Toolchain Gang to require no newer version of |
269
|
|
|
|
|
|
|
perl than v5.8.1. This version may change by agreement of the Toolchain Gang, |
270
|
|
|
|
|
|
|
but for now is governed by the L<Lancaster |
271
|
|
|
|
|
|
|
Consensus|https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md> |
272
|
|
|
|
|
|
|
of 2013. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=head1 METHODS |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
=head2 new |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
my $license = $subclass->new(\%arg); |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
This method returns a new license object for the given license class. Valid |
281
|
|
|
|
|
|
|
arguments are: |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
=over 4 |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=item holder |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
the holder of the copyright; required |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
=item year |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
the year of copyright; defaults to current year |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
=item program |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
the name of software for use in the middle of a sentence |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
=item Program |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
the name of software for use in the beginning of a sentence |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
=back |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
C<program> and C<Program> arguments may be specified both, either one or none. |
304
|
|
|
|
|
|
|
Each argument, if not specified, is defaulted to another one, or to properly |
305
|
|
|
|
|
|
|
capitalized "this program", if both arguments are omitted. |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
=head2 year |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
=head2 holder |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
These methods are attribute readers. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=head2 program |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
Name of software for using in the middle of a sentence. |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
The method returns value of C<program> constructor argument (if it evaluates as true, i. e. |
318
|
|
|
|
|
|
|
defined, non-empty, non-zero), or value of C<Program> constructor argument (if it is true), or |
319
|
|
|
|
|
|
|
"this program" as the last resort. |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=head2 Program |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
Name of software for using in the middle of a sentence. |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
The method returns value of C<Program> constructor argument (if it is true), or value of C<program> |
326
|
|
|
|
|
|
|
constructor argument (if it is true), or "This program" as the last resort. |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=head2 name |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
This method returns the name of the license, suitable for shoving in the middle |
331
|
|
|
|
|
|
|
of a sentence, generally with a leading capitalized "The." |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
=head2 url |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
This method returns the URL at which a canonical text of the license can be |
336
|
|
|
|
|
|
|
found, if one is available. If possible, this will point at plain text, but it |
337
|
|
|
|
|
|
|
may point to an HTML resource. |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
=head2 notice |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
This method returns a snippet of text, usually a few lines, indicating the |
342
|
|
|
|
|
|
|
copyright holder and year of copyright, as well as an indication of the license |
343
|
|
|
|
|
|
|
under which the software is distributed. |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
=head2 license |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
This method returns the full text of the license. |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
=head2 fulltext |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
This method returns the complete text of the license, preceded by the copyright |
352
|
|
|
|
|
|
|
notice. |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=head2 version |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
This method returns the version of the license. If the license is not |
357
|
|
|
|
|
|
|
versioned, this method will return false. |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=head2 meta_name |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
This method returns the string that should be used for this license in the CPAN |
362
|
|
|
|
|
|
|
META.yml file, according to the CPAN Meta spec v1, or undef if there is no |
363
|
|
|
|
|
|
|
known string to use. |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
This method may also be invoked as C<meta_yml_name> for legacy reasons. |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=head2 meta2_name |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
This method returns the string that should be used for this license in the CPAN |
370
|
|
|
|
|
|
|
META.json or META.yml file, according to the CPAN Meta spec v2, or undef if |
371
|
|
|
|
|
|
|
there is no known string to use. If this method does not exist, and |
372
|
|
|
|
|
|
|
C<meta_name> returns open_source, restricted, unrestricted, or unknown, that |
373
|
|
|
|
|
|
|
value will be used. |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=head2 spdx_expression |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
This method should return the string with the spdx identifier as indicated by |
378
|
|
|
|
|
|
|
L<https://spdx.org/licenses/> |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=head1 LOOKING UP LICENSE CLASSES |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
If you have an entry in a F<META.yml> or F<META.json> file, or similar |
383
|
|
|
|
|
|
|
metadata, and want to look up the Software::License class to use, there are |
384
|
|
|
|
|
|
|
useful tools in L<Software::LicenseUtils>. |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=head1 TODO |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
=over 4 |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=item * |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
register licenses with aliases to allow $registry->get('gpl', 2); |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=back |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=head1 SEE ALSO |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
The specific license: |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
=over 4 |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=item * |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
L<Software::License::AGPL_3> |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=item * |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
L<Software::License::Apache_1_1> |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=item * |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
L<Software::License::Apache_2_0> |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=item * |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
L<Software::License::Artistic_1_0> |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=item * |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
L<Software::License::Artistic_2_0> |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=item * |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
L<Software::License::BSD> |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=item * |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
L<Software::License::CC0_1_0> |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=item * |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
L<Software::License::Custom> |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=item * |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
L<Software::License::EUPL_1_1> |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=item * |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
L<Software::License::EUPL_1_2> |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=item * |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
L<Software::License::FreeBSD> |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=item * |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
L<Software::License::GFDL_1_2> |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
=item * |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
L<Software::License::GFDL_1_3> |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
=item * |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
L<Software::License::GPL_1> |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
=item * |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
L<Software::License::GPL_2> |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
=item * |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
L<Software::License::GPL_3> |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
=item * |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
L<Software::License::LGPL_2_1> |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
=item * |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
L<Software::License::LGPL_3_0> |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
=item * |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
L<Software::License::MIT> |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
=item * |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
L<Software::License::Mozilla_1_0> |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
=item * |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
L<Software::License::Mozilla_1_1> |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
=item * |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
L<Software::License::Mozilla_2_0> |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
=item * |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
L<Software::License::None> |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
=item * |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
L<Software::License::OpenSSL> |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
=item * |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
L<Software::License::Perl_5> |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
=item * |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
L<Software::License::PostgreSQL> |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
=item * |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
L<Software::License::QPL_1_0> |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
=item * |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
L<Software::License::SSLeay> |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
=item * |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
L<Software::License::Sun> |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
=item * |
519
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
L<Software::License::Zlib> |
521
|
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
=back |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
Extra licenses are maintained on CPAN in separate modules. |
525
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
The L<App::Software::License> module comes with a script |
527
|
|
|
|
|
|
|
L<software-license|https://metacpan.org/pod/distribution/App-Software-License/script/software-license>, |
528
|
|
|
|
|
|
|
which provides a command-line interface |
529
|
|
|
|
|
|
|
to Software::License. |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
=head1 AUTHOR |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
Ricardo Signes <rjbs@semiotic.systems> |
534
|
|
|
|
|
|
|
|
535
|
|
|
|
|
|
|
=head1 CONTRIBUTORS |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
=for stopwords Alex Kapranoff Andrew Grangaard Axel Beckert Bernardo Rechea Bernhard Amann bowtie Brian Cassidy Phillips Craig Scrivner Curtis Brandt Dave Rolsky David E. Wheeler Golden Dominique Dumont Dylan William Hardison Flavio Poletti Florian Ragwitz Graham Knop Justin Baker Kang-min Liu Karen Etheridge Kenichi Ishigaki Kivanc Yazan Leon Timmermans 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 |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
=over 4 |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
=item * |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
Alex Kapranoff <kappa@yandex.ru> |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
=item * |
546
|
|
|
|
|
|
|
|
547
|
|
|
|
|
|
|
Andrew Grangaard <granny-github@ofb.net> |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
=item * |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
Axel Beckert <abe@deuxchevaux.org> |
552
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
=item * |
554
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
Bernardo Rechea <brbpub@gmail.com> |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
=item * |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
Bernhard Amann <bernhard@icsi.berkeley.edu> |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
=item * |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
bowtie <bowtie@cpan.org> |
564
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
=item * |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
Brian Cassidy <bricas@cpan.org> |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
=item * |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
Brian Phillips <bphillips@digitalriver.com> |
572
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
=item * |
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
Craig Scrivner <scrivner@geology.cwu.edu> |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
=item * |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
Curtis Brandt <curtis@cpan.org> |
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
=item * |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
584
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
=item * |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
David E. Wheeler <david@justatheory.com> |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
=item * |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
David Golden <dagolden@cpan.org> |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
=item * |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
Dominique Dumont <dod@debian.org> |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
=item * |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
Dylan William Hardison <dylan@hardison.net> |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
=item * |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
Flavio Poletti <flavio@polettix.it> |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
=item * |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
=item * |
610
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
Graham Knop <haarg@haarg.org> |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
=item * |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
Justin Baker <me@jbaker.dev> |
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
=item * |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
Kang-min Liu <gugod@gugod.org> |
620
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
=item * |
622
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
=item * |
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
Kenichi Ishigaki <ishigaki@cpan.org> |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
=item * |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
Kivanc Yazan <kivancyazan@gmail.com> |
632
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
=item * |
634
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
Leon Timmermans <fawaka@gmail.com> |
636
|
|
|
|
|
|
|
|
637
|
|
|
|
|
|
|
=item * |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
magnolia <magnolia.k@me.com> |
640
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
=item * |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
mikegrb <mgreb@linode.com> |
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
=item * |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
Neil Bowers <neil@bowers.com> |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
=item * |
650
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
Nicolas Rochelemagne <rochelemagne@cpanel.net> |
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
=item * |
654
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
Olivier Mengué <dolmen@cpan.org> |
656
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
=item * |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com> |
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
=item * |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
Shlomi Fish <shlomif@iglu.org.il> |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
=item * |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
srchulo <violapiratejunky@gmail.com> |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
=item * |
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
Syohei YOSHIDA <syohex@gmail.com> |
672
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
=item * |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
Tomasz Konojacki <me@xenu.pl> |
676
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
=item * |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
Van de Bugger <van.de.bugger@gmail.com> |
680
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
=item * |
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
Wesley Schwengle <wesley@schwengle.net> |
684
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
=back |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Ricardo Signes. |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
692
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
=cut |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
__NOTICE__ |
697
|
|
|
|
|
|
|
This software is Copyright (c) {{$self->year}} by {{$self->_dotless_holder}}. |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
This is free software, licensed under: |
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
{{ $self->name }} |