| 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
Condition33%1/3
ref $self->{"rows"} eq "ARRAY" and @{$self->{"rows"};}
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"};}
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 238 | ▶ | $self->{+AS_STRING} ||= '<TABLE NOT DISPLAYED>'; | ||||||||||||||||||||||||||
|
Condition100%2/2
$self->{"as_string"} ||= "<TABLE NOT DISPLAYED>"
MC/DC100%1/1
$self->{"as_string"} ||= "<TABLE NOT DISPLAYED>"
$self->{"as_string"}
Truth table100%2/2
A
A= $self->{"as_string"}
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||