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 81.8% 9 / 11 Podpod 100% 4 / 4 totaltotal 75.9% 41 / 54 CC 4 SCAR 4.6
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 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 $Software::License::PD::VERSION = '1.001';
7 }
8 # ABSTRACT: Public Domain pseudo-license
9  
10 1 ▶use base 'Software::License';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 require Software::License::MIT;
13 1 require Software::License::GPL_3;
14 1 require Software::License::Artistic_2_0;
15  
16  
17 1 ▶sub name { 'Public Domain pseudo-license (GPL, Artistic, MIT or PD)' }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
18 1 ▶sub url { 'http://edwardsamuels.com/copyright/beyond/articles/public.html' }
Subroutine url: called CC=1 SCAR=0.0
Pod documented
19 0 ▶sub meta_name { 'unrestricted' }
Subroutine meta_name: not called CC=1 SCAR=6.9
Pod documented
20 0 ▶sub meta2_name { 'unrestricted' }
Subroutine meta2_name: not called CC=1 SCAR=6.9
Pod documented
21  
22 2 ▶sub _mit {
Subroutine _mit: called CC=2 SCAR=7.1
23 2 my ($self) = @_;
24 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
25 year => $self->year,
26 holder => $self->holder,
27 });
28 }
29  
30 2 ▶sub _gpl {
Subroutine _gpl: called CC=2 SCAR=7.1
31 2 my ($self) = @_;
32 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
33 year => $self->year,
34 holder => $self->holder,
35 });
36 }
37  
38 2 ▶sub _tal {
Subroutine _tal: called CC=2 SCAR=7.1
39 2 my ($self) = @_;
40 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
41 year => $self->year,
42 holder => $self->holder,
43 });
44 }
45  
46 1 1;
47  
48  
49  
50 =pod
51  
52 =head1 NAME
53  
54 Software::License::PD - Public Domain pseudo-license
55  
56 =head1 VERSION
57  
58 version 1.001
59  
60 =head1 DESCRIPTION
61  
62 In legal circles, B<Public Domain> is defined as the absence of B<copyright>
63 (and therefore precludes the need for any B<license>). Artistic works enter
64 the Public Domain in two common situations:
65  
66 =over
67  
68 =item 1
69  
70 Where the work carries no license or copyright information, and precedes
71 the ratification of the I<Berne Convention for the Protection of Literary
72 and Artistic Works>
73  
74 =item 2
75  
76 Where the term of copyright has lapsed, the length of which varies between
77 jurisdictions
78  
79 =back
80  
81 Some authors have chosen to disclaim all rights to their works and attempt
82 to release them into the Public Domain. This is a particularly contentious
83 issue because some jurisdictions do not recognize an author's perogative to
84 disclaim all rights to their own work. In European countries, authors can
85 abandon their claim to copyright, but not Reputation Rights (which prevent
86 people from removing your name from your work, among other things).
87  
88 While I have researched the issue to some extent, I am not a lawyer and am
89 not qualified to provide legal advice. I have used this license for some of
90 my own packages, but am unsure whether it would stand up in a court of law.
91  
92 =head2 CREATIVE COMMONS ZERO
93  
94 The B<Creative Commons Zero> (CC0) license is an extremely liberal license,
95 which confers rights similar to Public Domain to the extent permissible by
96 law. However, Creative Commons does not recommend the application of their
97 licenses to software, see:
98 L<http://wiki.creativecommons.org/FAQ#Can_I_use_a_Creative_Commons_license_for_software.3F>
99  
100 =head1 NOTABLE PROJECTS
101  
102 Several notable Open Source software projects have been released into the
103 Public Domain:
104  
105 =over
106  
107 =item *
108  
109 SQLite, L<http://sqlite.org>
110  
111 =item *
112  
113 L<Math::Random::ISAAC>, as well as the algorithm and accompanying reference
114 implementation, L<http://burtleburtle.net/bob/rand/isaacafa.html>
115  
116 =back
117  
118 =head1 SEE ALSO
119  
120 =over
121  
122 =item *
123  
124 The Berne Convention for the Protection of Literary and Artistic Works,
125 L<http://wipo.int/treaties/en/ip/berne/index.html>
126  
127 =item *
128  
129 The Public Domain in Copyright Law,
130 L<http://edwardsamuels.com/copyright/beyond/articles/public.html>
131  
132 =item *
133  
134 Placing documents into the public domain,
135 L<http://cr.yp.to/publicdomain.html>
136  
137 =back
138  
139 =head1 BUGS
140  
141 Please report any bugs or feature requests on the bugtracker website
142 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Software-License-PD
143  
144 When submitting a bug or request, please include a test-file or a
145 patch to an existing test-file that illustrates the bug or desired
146 feature.
147  
148 =head1 AUTHOR
149  
150 Jonathan Yu <jawnsy@cpan.org>
151  
152 =head1 COPYRIGHT AND LICENSE
153  
154 This software is copyright (c) 2011 by Jonathan Yu <jawnsy@cpan.org>.
155  
156 This is free software; you can redistribute it and/or modify it under
157 the same terms as the Perl 5 programming language system itself.
158  
159 =cut
160  
161  
162 __DATA__
↑ Summary