blib/lib/Langertha/Holmgang/Suite.pm

filter: Statementstmt 71.4% 20 / 28 Branchbran n/a Conditioncond 25.0% 1 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 42.8% 3 / 7 Podpod 100% 2 / 2 totaltotal 60.4% 26 / 43 CC 3 SCAR 6.0
CC
3
Cov
66%
case
2.7
case
2.7
__ANON__
1.1
CRAP 1.8
« blib/lib/Langertha/Holmgang/Error.pm ↑ Summary bin/holmgang »
1 package Langertha::Holmgang::Suite;
2 # ABSTRACT: A suite: head, tools, defaults and its cases in load order
3  
4 35 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 35 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 35 our $VERSION = '0.001';
8  
9  
10 35 has id => ( is => 'ro', required => 1 );
11  
12  
13 35 has topic => ( is => 'ro', default => 'sonstiges' );
14  
15  
16 35 has $_ => ( is => 'ro' ) for qw( version title description license source threshold repeat digest );
17  
18  
19 0 ▶has defaults => ( is => 'ro', default => sub { {} } );
Subroutine __ANON__: not called CC=1 SCAR=1.2
20  
21  
22 0 ▶has tools => ( is => 'ro', default => sub { [] } );
Subroutine __ANON__: not called CC=1 SCAR=1.2
23  
24  
25 0 ▶has cases => ( is => 'ro', default => sub { [] } );
Subroutine __ANON__: not called CC=1 SCAR=1.2
26  
27  
28 # private: the files of a DSL suite's YAML export ({ files => [ [ name, bytes ] ],
29 # images => { name => path } }), set by Loader::assemble, written by Loader::export
30 35 has _export => ( is => 'ro', init_arg => '_export' );
31  
32 1 ▶sub case {
Subroutine case: called CC=2 SCAR=10.1
Pod documented
33 0 ▶ my ( $self, $id ) = @_;
Subroutine case: not called CC=2 SCAR=10.1
Pod documented
34 0 ▶ my ( $c ) = grep { $_->id eq ( $id // '' ) } @{ $self->cases };
Condition25%1/4
$id // ""
l!l
10
$id // ""
l!l
00
MC/DC0%0/1
$id // ""
$id
MC/DC0%0/1
$id // ""
$id
Truth table50%1/2
A
A= $id
Aresult
11
00
Truth table0%0/2
A
A= $id
Aresult
11
00
35 0 return $c;
36 }
37  
38  
39 35 __PACKAGE__->meta->make_immutable;
40  
41 __END__
« blib/lib/Langertha/Holmgang/Error.pm ↑ Summary bin/holmgang »