blib/lib/Software/License/PD.pm

filter: Statementstmt 91.6% 22 / 24 Branchbran n/a Conditioncond 66.6% 6 / 9 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 80.0% 8 / 10 Podpod 100% 4 / 4 totaltotal 75.4% 40 / 53 CC 4 SCAR 4.9
CC
4
Cov
85%
_mit
2.0
_gpl
2.0
_tal
2.0
CRAP 1.6
↑ Summary
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Software::License::PD;
5 # ABSTRACT: Public Domain pseudo-license
6 1 $Software::License::PD::VERSION = '1.002'; # TRIAL
7 1 ▶use base 'Software::License';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 require Software::License::MIT;
10 1 require Software::License::GPL_3;
11 1 require Software::License::Artistic_2_0;
12  
13  
14 1 ▶sub name { 'Public Domain pseudo-license (GPL, Artistic, MIT or PD)' }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
15 1 ▶sub url { 'http://edwardsamuels.com/copyright/beyond/articles/public.html' }
Subroutine url: called CC=1 SCAR=0.0
Pod documented
16 0 ▶sub meta_name { 'unrestricted' }
Subroutine meta_name: not called CC=1 SCAR=6.9
Pod documented
17 0 ▶sub meta2_name { 'unrestricted' }
Subroutine meta2_name: not called CC=1 SCAR=6.9
Pod documented
18  
19 2 ▶sub _mit {
Subroutine _mit: called CC=2 SCAR=7.1
20 2 my ($self) = @_;
21 2 ▶ return $self->{_mit} ||= Software::License::MIT->new({
Condition66%2/3
$self->{"_mit"} ||= "Software::License::MIT"->new({"year", $self->year, "holder", $self->holder})
l!l&&r!l&&!r
110
MC/DC0%0/2
$self->{"_mit"} ||= "Software::License::MIT"->new({"year", $self->year, "holder", $self->holder})
$self->{"_mit"} "Software::License::MIT"->new({"year", $self->year, "holder", $self->holder})
Truth table66%2/3
A ||= B
A= $self->{"_mit"}B= "Software::License::MIT"->new({"year", $self->year, "holder", $self->holder})
ABresult
1X1
011
000
22 year => $self->year,
23 holder => $self->holder,
24 });
25 }
26  
27 2 ▶sub _gpl {
Subroutine _gpl: called CC=2 SCAR=7.1
28 2 my ($self) = @_;
29 2 ▶ return $self->{_gpl} ||= Software::License::GPL_3->new({
Condition66%2/3
$self->{"_gpl"} ||= "Software::License::GPL_3"->new({"year", $self->year, "holder", $self->holder})
l!l&&r!l&&!r
110
MC/DC0%0/2
$self->{"_gpl"} ||= "Software::License::GPL_3"->new({"year", $self->year, "holder", $self->holder})
$self->{"_gpl"} "Software::License::GPL_3"->new({"year", $self->year, "holder", $self->holder})
Truth table66%2/3
A ||= B
A= $self->{"_gpl"}B= "Software::License::GPL_3"->new({"year", $self->year, "holder", $self->holder})
ABresult
1X1
011
000
30 year => $self->year,
31 holder => $self->holder,
32 });
33 }
34  
35 2 ▶sub _tal {
Subroutine _tal: called CC=2 SCAR=7.1
36 2 my ($self) = @_;
37 2 ▶ return $self->{_tal} ||= Software::License::Artistic_2_0->new({
Condition66%2/3
$self->{"_tal"} ||= "Software::License::Artistic_2_0"->new({"year", $self->year, "holder", $self->holder})
l!l&&r!l&&!r
110
MC/DC0%0/2
$self->{"_tal"} ||= "Software::License::Artistic_2_0"->new({"year", $self->year, "holder", $self->holder})
$self->{"_tal"} "Software::License::Artistic_2_0"->new({"year", $self->year, "holder", $self->holder})
Truth table66%2/3
A ||= B
A= $self->{"_tal"}B= "Software::License::Artistic_2_0"->new({"year", $self->year, "holder", $self->holder})
ABresult
1X1
011
000
38 year => $self->year,
39 holder => $self->holder,
40 });
41 }
42  
43 1 1;
44  
45 =pod
46  
47 =head1 NAME
48  
49 Software::License::PD - Public Domain pseudo-license
50  
51 =head1 VERSION
52  
53 version 1.002
54  
55 =head1 DESCRIPTION
56  
57 In legal circles, B<Public Domain> is defined as the absence of B<copyright>
58 (and therefore precludes the need for any B<license>). Artistic works enter
59 the Public Domain in two common situations:
60  
61 =over
62  
63 =item 1
64  
65 Where the work carries no license or copyright information, and precedes
66 the ratification of the I<Berne Convention for the Protection of Literary
67 and Artistic Works>; or
68  
69 =item 2
70  
71 Where the term of copyright has lapsed, the length of which varies between
72 jurisdictions
73  
74 =back
75  
76 Some authors have chosen to disclaim all rights to their works and release it
77 into the Public Domain, which is ideal when authors want to ensure that their
78 work can be used without any restrictions whatsoever. However, the notion of
79 relinquishing work into the Public Domain can be contentious in some cases,
80 since some jurisdictions may not recognize an author's prerogative to disclaim
81 all rights to their own work. In European countries, for example, authors can
82 abandon their claim to copyright, but not reputation rights (which prevent
83 people from removing your name from your work, among other things).
84  
85 While I have researched the issue to some extent, I am not a lawyer and am
86 not qualified to provide legal advice. I have used this license for some of
87 my own packages, but am unsure whether it would stand up in a court of law.
88  
89 =encoding utf8
90  
91 =head1 USAGE
92  
93 This module can be used with L<Dist::Zilla> simply by specifying:
94  
95 ; authordep Software::License::PD
96 license = PD
97  
98 in your C<dist.ini> file.
99  
100 =head1 WHY NOT CREATIVE COMMONS ZERO?
101  
102 The B<Creative Commons Zero> (CC0) license is an extremely liberal license,
103 which confers rights similar to Public Domain to the extent permissible by
104 law. However, Creative Commons does not recommend the application of their
105 licenses to software, see: L<Can I apply a Creative Commons license to
106 software?|https://wiki.creativecommons.org/wiki/Frequently_Asked_Questions#Can_I_apply_a_Creative_Commons_license_to_software.3F>
107  
108 =head1 NOTABLE PROJECTS
109  
110 Several notable Open Source software projects have been released into the
111 Public Domain, including:
112  
113 =over
114  
115 =item *
116  
117 L<SQLite|http://sqlite.org>, a popular embedded database library included
118 in many other projects, both open source and proprietary
119  
120 =item *
121  
122 L<djbdns|http://cr.yp.to/djbdns.html>, a small DNS server used in many
123 embedded devices, along with L<numerous other projects published by
124 Daniel J. Bernstein|http://cr.yp.to/distributors.html>
125  
126 =item *
127  
128 L<Berkeley Yacc|http://invisible-island.net/byacc/byacc.html>
129  
130 =item *
131  
132 L<Math::Random::ISAAC>, as well as the L<algorithm and accompanying reference
133 implementation|http://burtleburtle.net/bob/rand/isaacafa.html>
134  
135 =back
136  
137 =head1 SEE ALSO
138  
139 =over
140  
141 =item *
142  
143 The L<Berne Convention for the Protection of Literary and Artistic
144 Works|http://wipo.int/treaties/en/ip/berne/index.html>, which provides
145 automatic internationalised copyright ownership for authors of artistic
146 works.
147  
148 =item *
149  
150 Edward Samuels' exploration of L<The Public Domain in Copyright
151 Law|http://edwardsamuels.com/copyright/beyond/articles/public.html>,
152 which describes the nature of copyright and the mechanisms under which
153 works can enter the public domain (e.g. through expiration or forfeiture
154 of copyright, or non-copyrightable works.)
155  
156 =item *
157  
158 Daniel J. Bernstein's examination, L<Placing documents into the public
159 domain|http://cr.yp.to/publicdomain.html>
160  
161 =item *
162  
163 L<The Unlicense|http://unlicense.org/>, a copyright waiver statement
164  
165 =item *
166  
167 L<Managing copyright information within a free software
168 project|https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html>,
169 published by the Software Freedom Law Center
170  
171 =back
172  
173 =head1 AUTHOR
174  
175 Jonathan Yu <jawnsy@cpan.org>
176  
177 =head1 COPYRIGHT AND LICENSE
178  
179 Legally speaking, this package and its contents are:
180  
181 Copyright (c) 2015 by Jonathan Yu <jawnsy@cpan.org>.
182  
183 But this is really just a legal technicality that allows the author to
184 offer this package under the public domain and also a variety of licensing
185 options. For all intents and purposes, this is public domain software,
186 which means you can do whatever you want with it.
187  
188 The software is provided "AS IS", without warranty of any kind, express or
189 implied, including but not limited to the warranties of merchantability,
190 fitness for a particular purpose and noninfringement. In no event shall the
191 authors or copyright holders be liable for any claim, damages or other
192 liability, whether in an action of contract, tort or otherwise, arising from,
193 out of or in connection with the software or the use or other dealings in
194 the software.
195  
196 =cut
197  
198 __DATA__
↑ Summary