File Coverage

blib/lib/Software/Policies/Contributing.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition 2 2 100.0
subroutine 8 8 100.0
pod 3 3 100.0
total 37 37 100.0


line stmt bran cond sub pod time code
1             package Software::Policies::Contributing;
2              
3 3     3   10492 use strict;
  3         9  
  3         186  
4 3     3   19 use warnings;
  3         8  
  3         213  
5 3     3   84 use 5.010;
  3         15  
6              
7             # ABSTRACT: Create project policy file: Contributing
8              
9             our $VERSION = '0.002';
10              
11 3     3   23 use Carp;
  3         18  
  3         348  
12              
13 3     3   22 use Module::Load qw( load );
  3         7  
  3         26  
14              
15             sub new {
16 3     3 1 8 my ($class) = @_;
17 3         18 return bless {}, $class;
18             }
19              
20             sub create {
21 3     3 1 11 my ( $self, %args ) = @_;
22 3   100     17 my $class = $args{'class'} // 'PerlDistZilla';
23              
24 3         15 my $module = __PACKAGE__ . q{::} . $class;
25 3         60 load $module;
26 3         151 my $m = $module->new();
27 3         16 my %r = $m->create(%args);
28 3         37 return \%r;
29             }
30              
31             sub get_available_classes_and_versions {
32             return {
33 1     1 1 14 'PerlDistZilla' => {
34             versions => {
35             '1' => 1,
36             },
37             formats => {
38             'markdown' => 1,
39             'text' => 1,
40             },
41             },
42             };
43             }
44              
45             1;
46              
47             __END__