Kantan/Suite.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 2 totaltotal 95.1% 39 / 41 CC 2 SCAR 1.8
CC
2
Cov
100%
call_trigger
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Kantan/Reporter/Base.pm ↑ Summary Kantan/State.pm »
1 package Test::Kantan::Suite;
2 55 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 55 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 55 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 55 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 55 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 55 has title => ( is => 'ro', required => 1 );
10 55 has root => ( is => 'ro' );
11 55 has parent => ( is => 'ro' );
12 174 ▶has triggers => ( is => 'ro', default => sub { +{} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
13  
14 55 ▶no Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 238 ▶sub call_trigger {
Subroutine call_trigger: called CC=2 SCAR=6.9
Pod undocumented
17 238 my ($self, $trigger_name) = @_;
18 238 for my $trigger (@{$self->{triggers}->{$trigger_name}}) {
19 8 $trigger->();
20 }
21 }
22  
23 4 ▶sub add_trigger {
Subroutine add_trigger: called CC=1 SCAR=0.0
Pod undocumented
24 4 my ($self, $trigger_name, $code) = @_;
25 4 push @{$self->{triggers}->{$trigger_name}}, $code;
26 }
27  
28 55 1;
29  
« Kantan/Reporter/Base.pm ↑ Summary Kantan/State.pm »