| 1 | # no critic (ControlStructures::ProhibitPostfixControls) | ||||||||||||
| 2 | package Software::Policies::CodeOfConduct; | ||||||||||||
| 3 | |||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 2 | ▶ | use 5.010; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | # ABSTRACT: Create project policy file: Code of Conduct | ||||||||||||
| 9 | |||||||||||||
| 10 | 2 | our $VERSION = '0.006'; | |||||||||||
| 11 | |||||||||||||
| 12 | 2 | ▶ | use Carp; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 2 | ▶ | use Module::Load qw( load ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 2 | ▶ | use Module::Loader (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | |||||||||||||
| 17 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 18 | 0 | my ($class) = @_; | |||||||||||
| 19 | 0 | return bless {}, $class; | |||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | 0 | ▶ | sub create { | ||||||||||
|
Subroutine
create: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 23 | 0 | my ( $self, %args ) = @_; | |||||||||||
| 24 | 0 | ▶ | my $class = delete $args{'class'} // 'ContributorCovenant'; | ||||||||||
|
Condition0%0/2
delete $args{"class"} // "ContributorCovenant"
MC/DC0%0/1
delete $args{"class"} // "ContributorCovenant"
delete $args{"class"}
Truth table0%0/2
A
A= delete $args{"class"}
| |||||||||||||
| 25 | 0 | my $module = __PACKAGE__ . q{::} . $class; | |||||||||||
| 26 | 0 | load $module; | |||||||||||
| 27 | 0 | my $m = $module->new(); | |||||||||||
| 28 | 0 | my %r = $m->create(%args); | |||||||||||
| 29 | |||||||||||||
| 30 | 0 | return \%r; | |||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 1 | ▶ | sub get_available_classes_and_versions { | ||||||||||
|
Subroutine
get_available_classes_and_versions: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 34 | return { | ||||||||||||
| 35 | 1 | '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 | 2 | 1; | |||||||||||
| 49 | |||||||||||||
| 50 | __END__ | ||||||||||||