File Coverage

blib/lib/Software/License/Artistic_1_0.pm
Criterion Covered Total %
statement 17 19 89.4
branch 2 4 50.0
condition 2 3 66.6
subroutine 8 9 88.8
pod 6 6 100.0
total 35 41 85.3


line stmt bran cond sub pod time code
1 12     12   7473 use strict;
  12         26  
  12         371  
2 12     12   68 use warnings;
  12         22  
  12         550  
3             package Software::License::Artistic_1_0;
4             $Software::License::Artistic_1_0::VERSION = '0.104001';
5 12     12   69 use parent 'Software::License';
  12         23  
  12         204  
6             # ABSTRACT: The Artistic License
7              
8             #pod =head1 OPTIONS
9             #pod
10             #pod The Artistic License 1.0 has a sometimes-omitted "aggregation clause" which
11             #pod reads:
12             #pod
13             #pod 8. The name of the Copyright Holder may not be used to endorse or promote
14             #pod products derived from this software without specific prior written
15             #pod permission.
16             #pod
17             #pod By default, this clause will be included. To disable it, include the following
18             #pod pair when instantiating the license:
19             #pod
20             #pod aggregation_clause => 0
21             #pod
22             #pod =head1 METHODS
23             #pod
24             #pod =head2 aggregation_clause
25             #pod
26             #pod This method returns whether the aggregation clause is allowed on this instance.
27             #pod By default this method returns true on instances and dies on the class.
28             #pod
29             #pod =cut
30              
31             sub aggregation_clause {
32 9 50   9 1 7098 exists $_[0]->{aggregation_clause} ? $_[0]->{aggregation_clause} : 1
33             }
34              
35 0     0 1 0 sub url { 'http://www.perlfoundation.org/artistic_license_1_0' }
36              
37             sub name {
38 27     27 1 362 my ($self) = @_;
39              
40 27         54 my $name = 'The Artistic License 1.0';
41 27 50 66     114 if (ref $self and not $self->aggregation_clause) {
42 0         0 $name .= ' without Aggregation Clause';
43             }
44              
45 27         91 return $name;
46             }
47              
48 43     43 1 188 sub meta_name { 'artistic' }
49 42     42 1 106 sub meta2_name { 'artistic_1' }
50 43     43 1 125 sub spdx_expression { 'Artistic-1.0' }
51              
52             1;
53              
54             =pod
55              
56             =encoding UTF-8
57              
58             =head1 NAME
59              
60             Software::License::Artistic_1_0 - The Artistic License
61              
62             =head1 VERSION
63              
64             version 0.104001
65              
66             =head1 OPTIONS
67              
68             The Artistic License 1.0 has a sometimes-omitted "aggregation clause" which
69             reads:
70              
71             8. The name of the Copyright Holder may not be used to endorse or promote
72             products derived from this software without specific prior written
73             permission.
74              
75             By default, this clause will be included. To disable it, include the following
76             pair when instantiating the license:
77              
78             aggregation_clause => 0
79              
80             =head1 METHODS
81              
82             =head2 aggregation_clause
83              
84             This method returns whether the aggregation clause is allowed on this instance.
85             By default this method returns true on instances and dies on the class.
86              
87             =head1 AUTHOR
88              
89             Ricardo Signes
90              
91             =head1 COPYRIGHT AND LICENSE
92              
93             This software is copyright (c) 2021 by Ricardo Signes.
94              
95             This is free software; you can redistribute it and/or modify it under
96             the same terms as the Perl 5 programming language system itself.
97              
98             =cut
99              
100             __DATA__