blib/lib/Test2/EventFacet/Info/Table.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 1 / 2 Conditioncond 60.0% 3 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 7 / 7 Podpod 66.6% 2 / 3 totaltotal 86.9% 40 / 46 CC 4 SCAR 8.5
CC
4
Cov
91%
init
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« blib/lib/Test2/Tools/Encoding.pm ↑ Summary blib/lib/Test2/Require/Module.pm »
1 package Test2::EventFacet::Info::Table;
2 177 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 177 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 177 our $VERSION = '1.302226';
6  
7 177 ▶use Carp qw/confess/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 177 ▶use Test2::Util::HashBase qw{-header -rows -collapse -no_collapse -as_string};
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 238 ▶sub init {
Subroutine init: called CC=4 SCAR=14.6
Pod undocumented
12 238 my $self = shift;
13  
14 238 ▶ confess "Table may not be empty" unless ref($self->{+ROWS}) eq 'ARRAY' && @{$self->{+ROWS}};
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self->{"rows"} eq "ARRAY" and @{$self->{"rows"};} 0 238 238
Condition33%1/3
ref $self->{"rows"} eq "ARRAY" and @{$self->{"rows"};}
!ll&&!rl&&r
00238
MC/DC0%0/2
ref $self->{"rows"} eq "ARRAY" and @{$self->{"rows"};}
ref $self->{"rows"} eq "ARRAY" @{$self->{"rows"};}
Truth table33%1/3
A and B
A= ref $self->{"rows"} eq "ARRAY"B= @{$self->{"rows"};}
ABresult
0X0
100
111
15  
16 238 ▶ $self->{+AS_STRING} ||= '<TABLE NOT DISPLAYED>';
Condition100%2/2
$self->{"as_string"} ||= "<TABLE NOT DISPLAYED>"
l!l
2371
MC/DC100%1/1
$self->{"as_string"} ||= "<TABLE NOT DISPLAYED>"
$self->{"as_string"}
Truth table100%2/2
A
A= $self->{"as_string"}
Aresult
11
00
17 }
18  
19 230 ▶sub as_hash { my $out = +{%{$_[0]}}; delete $out->{as_string}; $out }
Subroutine as_hash: called CC=1 SCAR=0.0
Pod documented
20  
21 230 ▶sub info_args {
Subroutine info_args: called CC=1 SCAR=0.0
Pod documented
22 230 my $self = shift;
23  
24 230 my $hash = $self->as_hash;
25 230 my $desc = $self->as_string;
26  
27 230 return (table => $hash, details => $desc);
28 }
29  
30 177 1;
31  
32 __END__
« blib/lib/Test2/Tools/Encoding.pm ↑ Summary blib/lib/Test2/Require/Module.pm »