| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# no critic (ControlStructures::ProhibitPostfixControls) |
|
2
|
|
|
|
|
|
|
package Software::Policies::CodeOfConduct; |
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
3619
|
use strict; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
84
|
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
104
|
|
|
6
|
2
|
|
|
2
|
|
35
|
use 5.010; |
|
|
2
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Create project policy file: Code of Conduct |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.002'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
14
|
use Carp; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
178
|
|
|
13
|
2
|
|
|
2
|
|
13
|
use Module::Load qw( load ); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
14
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
141
|
use Module::Loader (); |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
609
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
|
18
|
0
|
|
|
0
|
1
|
0
|
my ($class) = @_; |
|
19
|
0
|
|
|
|
|
0
|
return bless {}, $class; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub create { |
|
23
|
0
|
|
|
0
|
1
|
0
|
my ( $self, %args ) = @_; |
|
24
|
0
|
|
0
|
|
|
0
|
my $class = delete $args{'class'} // 'ContributorCovenant'; |
|
25
|
0
|
|
|
|
|
0
|
my $module = __PACKAGE__ . q{::} . $class; |
|
26
|
0
|
|
|
|
|
0
|
load $module; |
|
27
|
0
|
|
|
|
|
0
|
my $m = $module->new(); |
|
28
|
0
|
|
|
|
|
0
|
my %r = $m->create(%args); |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
0
|
return \%r; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_available_classes_and_versions { |
|
34
|
|
|
|
|
|
|
return { |
|
35
|
1
|
|
|
1
|
1
|
13
|
'ContributorCovenant' => { |
|
36
|
|
|
|
|
|
|
versions => { |
|
37
|
|
|
|
|
|
|
'1.4' => 1, |
|
38
|
|
|
|
|
|
|
'2.0' => 1, |
|
39
|
|
|
|
|
|
|
'2.1' => 1, |
|
40
|
|
|
|
|
|
|
}, |
|
41
|
|
|
|
|
|
|
formats => { |
|
42
|
|
|
|
|
|
|
'markdown' => 1, |
|
43
|
|
|
|
|
|
|
}, |
|
44
|
|
|
|
|
|
|
}, |
|
45
|
|
|
|
|
|
|
}; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# sub _filename { |
|
49
|
|
|
|
|
|
|
# my ($format) = @_; |
|
50
|
|
|
|
|
|
|
# my %formats = ( |
|
51
|
|
|
|
|
|
|
# 'markdown' => 'CODE_OF_CONDUCT.md', |
|
52
|
|
|
|
|
|
|
# 'text' => 'CODE_OF_CONDUCT.txt', |
|
53
|
|
|
|
|
|
|
# ); |
|
54
|
|
|
|
|
|
|
# return $formats{$format}; |
|
55
|
|
|
|
|
|
|
# } |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |