| 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 // ""
$id // ""
MC/DC0%0/1
$id // ""
$id
MC/DC0%0/1
$id // ""
$id
Truth table50%1/2
A
A= $id
Truth table0%0/2
A
A= $id
| |||||||||||||||||||||||
| 35 | 0 | return $c; | |||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||
| 37 | |||||||||||||||||||||||
| 38 | |||||||||||||||||||||||
| 39 | 35 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||
| 40 | |||||||||||||||||||||||
| 41 | __END__ | ||||||||||||||||||||||