File Coverage

blib/lib/ExtUtils/ModuleMaker/Licenses/Local.pm
Criterion Covered Total %
statement 24 27 88.8
branch 2 4 50.0
condition 0 3 0.0
subroutine 8 9 88.8
pod 3 4 75.0
total 37 47 78.7


line stmt bran cond sub pod time code
1             package ExtUtils::ModuleMaker::Licenses::Local;
2 86     86   296 use strict;
  86         104  
  86         2012  
3 86     86   254 use warnings;
  86         89  
  86         2253  
4              
5             BEGIN {
6 86     86   256 use base qw(Exporter);
  86         1006  
  86         5175  
7 86     86   286 use vars qw( @EXPORT_OK $VERSION );
  86         89  
  86         4374  
8 86     86   110 $VERSION = 0.56;
9 86         16492 @EXPORT_OK = qw(Get_Local_License Verify_Local_License);
10             }
11              
12             my %licenses = (
13             looselips => {
14             function => \&License_LooseLips,
15             fullname => 'Loose Lips License (1.0)',
16             },
17             );
18              
19             sub Get_Local_License {
20 80     80 1 115 my $choice = shift;
21              
22 80         132 $choice = lc ($choice);
23 80 100       265 return ($licenses{$choice}{function}) if (exists $licenses{$choice});
24 78         531 return;
25             }
26              
27             sub Verify_Local_License {
28 89     89 1 149 my $choice = shift;
29 89         899 return (exists $licenses{lc ($choice)});
30             }
31              
32             sub interact {
33 0     0 0 0 my $class = shift;
34             return (bless (
35 0   0     0 { map { ($licenses{$_}{fullname})
36             ? ($_ => $licenses{$_}{fullname})
37 0 0       0 : ()
38             } keys (%licenses)
39             }, ref ($class) || $class)
40             );
41             }
42              
43             sub License_LooseLips {
44 2     2 1 2 my %license;
45              
46 2         8 $license{COPYRIGHT} = <
47             This program is licensed under the...
48              
49             Loose Lips License
50              
51             The full text of the license can be found in the
52             LICENSE file included with this module.
53             EOFCOPYRIGHT
54              
55 2         6 $license{LICENSETEXT} = <
56             Loose Lips License
57             Version 1.0
58              
59             Copyright (c) ###year### ###organization###. All rights reserved.
60              
61             This software is the intellectual property of ###organization###. Its
62             contents are a trade secret and are not to be shared with anyone outside
63             the organization.
64              
65             Remember, "Loose lips sink ships."
66             EOFLICENSETEXT
67              
68 2         6 return (\%license);
69             }
70              
71             1;
72              
73             #################### DOCUMENTATION ####################
74              
75             =head1 NAME
76              
77             ExtUtils::ModuleMaker::Licenses::Local - Templates for the module's License/Copyright
78              
79             =head1 SYNOPSIS
80              
81             use ExtUtils::ModuleMaker::Licenses::Local;
82             blah blah blah
83              
84             =head1 DESCRIPTION
85              
86             This package holds subroutines imported and used by
87             ExtUtils::ModuleMaker to include license and copyright information in a
88             standard Perl module distribution.
89              
90             =head1 USAGE
91              
92             This package always exports two functions:
93              
94             =over 4
95              
96             =item * C
97              
98             =item * C
99              
100             =back
101              
102             =head2 License_LooseLips
103              
104             Purpose : Get the copyright pod text and LICENSE file text for this license
105              
106             =head1 BUGS
107              
108             None known at this time.
109              
110             =head1 AUTHOR/MAINTAINER
111              
112             ExtUtils::ModuleMaker was originally written in 2001-02 by R. Geoffrey Avery
113             (modulemaker [at] PlatypiVentures [dot] com). Since version 0.33 (July
114             2005) it has been maintained by James E. Keenan (jkeenan [at] cpan [dot]
115             org).
116              
117             =head1 SUPPORT
118              
119             Send email to jkeenan [at] cpan [dot] org. Please include 'modulemaker'
120             in the subject line.
121              
122             =head1 COPYRIGHT
123              
124             Copyright (c) 2001-2002 R. Geoffrey Avery.
125             Revisions from v0.33 forward (c) 2005, 2017 James E. Keenan. All rights reserved.
126             This program is free software; you can redistribute
127             it and/or modify it under the same terms as Perl itself.
128              
129             The full text of the license can be found in the
130             LICENSE file included with this module.
131              
132             =head1 SEE ALSO
133              
134             F, F, perl(1).
135              
136             =cut
137