| 1 | package DBD::Mock::StatementTrack; | ||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||
| 3 | 40 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 4 | 40 | ▶ | use warnings; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||
| 6 | sub new { | ||||||||||||||||||||||||||||||||
| 7 | 143 | ▶ | my ( $class, %params ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=9 SCAR=22.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||
| 9 | # these params have default values | ||||||||||||||||||||||||||||||||
| 10 | # but can be overridden | ||||||||||||||||||||||||||||||||
| 11 | 143 | ▶ | $params{return_data} ||= []; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$params{"return_data"} ||= []
MC/DC100%1/1
$params{"return_data"} ||= []
$params{"return_data"}
Truth table100%2/2
A
A= $params{"return_data"}
| |||||||||||||||||||||||||||||||||
| 12 | 143 | ▶ | $params{fields} ||= $DBD::Mock::DefaultFieldsToUndef ? undef : []; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$params{"fields"} ||= $DBD::Mock::DefaultFieldsToUndef ? undef : []
MC/DC100%2/2
$params{"fields"} ||= $DBD::Mock::DefaultFieldsToUndef ? undef : []
$params{"fields"}
$DBD::Mock::DefaultFieldsToUndef ? undef : []
Truth table100%3/3
A ||= B
A= $params{"fields"}B= $DBD::Mock::DefaultFieldsToUndef ? undef : []
| |||||||||||||||||||||||||||||||||
| 13 | 143 | ▶ | $params{bound_params} ||= []; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$params{"bound_params"} ||= []
MC/DC100%1/1
$params{"bound_params"} ||= []
$params{"bound_params"}
Truth table100%2/2
A
A= $params{"bound_params"}
| |||||||||||||||||||||||||||||||||
| 14 | 143 | ▶ | $params{bound_param_attrs} ||= []; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$params{"bound_param_attrs"} ||= []
MC/DC0%0/1
$params{"bound_param_attrs"} ||= []
$params{"bound_param_attrs"}
Truth table50%1/2
A
A= $params{"bound_param_attrs"}
| |||||||||||||||||||||||||||||||||
| 15 | 143 | ▶ | $params{statement} ||= ""; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$params{"statement"} ||= ""
MC/DC100%1/1
$params{"statement"} ||= ""
$params{"statement"}
Truth table100%2/2
A
A= $params{"statement"}
| |||||||||||||||||||||||||||||||||
| 16 | 143 | ▶ | $params{failure} ||= undef; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$params{"failure"} ||= undef
MC/DC100%1/1
$params{"failure"} ||= undef
$params{"failure"}
Truth table100%2/2
A
A= $params{"failure"}
| |||||||||||||||||||||||||||||||||
| 17 | 143 | ▶ | $params{callback} ||= undef; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$params{"callback"} ||= undef
MC/DC100%1/1
$params{"callback"} ||= undef
$params{"callback"}
Truth table100%2/2
A
A= $params{"callback"}
| |||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||
| 19 | # these params should never be overridden | ||||||||||||||||||||||||||||||||
| 20 | # and should always start out in a default | ||||||||||||||||||||||||||||||||
| 21 | # state to assure the sanity of this class | ||||||||||||||||||||||||||||||||
| 22 | 143 | $params{is_executed} = 'no'; | |||||||||||||||||||||||||||||||
| 23 | 143 | $params{is_finished} = 'no'; | |||||||||||||||||||||||||||||||
| 24 | 143 | $params{current_record_num} = 0; | |||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||
| 26 | # NOTE: | ||||||||||||||||||||||||||||||||
| 27 | # changed from \%params here because that | ||||||||||||||||||||||||||||||||
| 28 | # would bind the hash sent in so that it | ||||||||||||||||||||||||||||||||
| 29 | # would reflect alterations in the object | ||||||||||||||||||||||||||||||||
| 30 | # this violates encapsulation | ||||||||||||||||||||||||||||||||
| 31 | 143 | my $self = bless {%params}, $class; | |||||||||||||||||||||||||||||||
| 32 | 143 | return $self; | |||||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||
| 35 | sub has_failure { | ||||||||||||||||||||||||||||||||
| 36 | 145 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
has_failure: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 37 | 145 | ▶ | $self->{failure} ? 1 : 0; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||
| 40 | sub get_failure { | ||||||||||||||||||||||||||||||||
| 41 | 3 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
get_failure: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 42 | 3 | @{ $self->{failure} }; | |||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||
| 45 | sub num_fields { | ||||||||||||||||||||||||||||||||
| 46 | 4 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
num_fields: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 47 | 4 | ▶ | return $self->{fields} ? scalar @{ $self->{fields} } : $self->{fields}; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||
| 50 | sub num_rows { | ||||||||||||||||||||||||||||||||
| 51 | 48 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
num_rows: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 52 | 48 | return scalar @{ $self->{return_data} }; | |||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | sub num_params { | ||||||||||||||||||||||||||||||||
| 56 | 139 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
num_params: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 57 | 139 | return scalar @{ $self->{bound_params} }; | |||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||
| 60 | sub bind_col { | ||||||||||||||||||||||||||||||||
| 61 | 13 | ▶ | my ( $self, $param_num, $ref ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bind_col: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 62 | 13 | $self->{bind_cols}->[ $param_num - 1 ] = $ref; | |||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||
| 65 | sub bound_param { | ||||||||||||||||||||||||||||||||
| 66 | 17 | ▶ | my ( $self, $param_num, $value, $attr ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bound_param: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||
| 68 | # Basic support for named parameters | ||||||||||||||||||||||||||||||||
| 69 | 17 | ▶ | if ( $param_num !~ /^\d+/ ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 70 | 2 | $param_num = $self->num_params + 1; | |||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||
| 73 | 17 | $self->{bound_params}->[ $param_num - 1 ] = $value; | |||||||||||||||||||||||||||||||
| 74 | 17 | ▶ | $self->{bound_param_attrs}->[ $param_num - 1 ] = ref $attr eq "HASH" ? { %$attr } : $attr; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||
| 76 | 17 | return $self->bound_params; | |||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||
| 79 | sub bound_param_trailing { | ||||||||||||||||||||||||||||||||
| 80 | 1 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bound_param_trailing: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 81 | 1 | push @{ $self->{bound_params} }, @values; | |||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||
| 84 | sub bind_cols { | ||||||||||||||||||||||||||||||||
| 85 | 123 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
bind_cols: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 86 | 123 | ▶ | return @{ $self->{bind_cols} || [] }; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||
| 89 | sub bind_params { | ||||||||||||||||||||||||||||||||
| 90 | 46 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bind_params: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 91 | 46 | @{ $self->{bound_params} } = @values; | |||||||||||||||||||||||||||||||
| 92 | 46 | @{ $self->{bound_param_attrs} } = map { undef } @values; | |||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||
| 95 | # Rely on the DBI's notion of Active: a statement is active if it's | ||||||||||||||||||||||||||||||||
| 96 | # currently in a SELECT and has more records to fetch | ||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||
| 98 | sub is_active { | ||||||||||||||||||||||||||||||||
| 99 | 10 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
is_active: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 100 | 10 | ▶ | return 0 unless $self->statement =~ /^\s*select/ism; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 101 | 7 | ▶ | return 0 unless $self->is_executed eq 'yes'; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 102 | 6 | ▶ | return 0 if $self->is_depleted; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 103 | 3 | return 1; | |||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||
| 106 | sub is_finished { | ||||||||||||||||||||||||||||||||
| 107 | 50 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
is_finished: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 108 | 50 | ▶ | if ( defined $value && $value eq 'yes' ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
defined $value and $value eq "yes"
MC/DC100%2/2
defined $value and $value eq "yes"
defined $value
$value eq "yes"
Truth table100%3/3
A and B
A= defined $valueB= $value eq "yes"
| |||||||||||||||||||||||||||||||||
| 109 | 39 | $self->{is_finished} = 'yes'; | |||||||||||||||||||||||||||||||
| 110 | 39 | $self->current_record_num(0); | |||||||||||||||||||||||||||||||
| 111 | 39 | $self->{return_data} = []; | |||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||
| 113 | elsif ( defined $value ) { | ||||||||||||||||||||||||||||||||
| 114 | 1 | $self->{is_finished} = 'no'; | |||||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||||||
| 116 | 50 | return $self->{is_finished}; | |||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||
| 119 | #################### | ||||||||||||||||||||||||||||||||
| 120 | # RETURN VALUES | ||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||
| 122 | sub mark_executed { | ||||||||||||||||||||||||||||||||
| 123 | 134 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
mark_executed: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||
| 126 | 134 | push @{$self->{execution_history} }, { | |||||||||||||||||||||||||||||||
| 127 | 134 | params => [ @{ $self->{bound_params} } ], | |||||||||||||||||||||||||||||||
| 128 | 134 | attrs => [ @{ $self->{bound_param_attrs} } ], | |||||||||||||||||||||||||||||||
| 129 | }; | ||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||
| 131 | 134 | $self->is_executed('yes'); | |||||||||||||||||||||||||||||||
| 132 | 134 | $self->current_record_num(0); | |||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||
| 134 | 134 | ▶ | if (ref $self->{callback} eq "CODE") { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 135 | 11 | my %recordSet = $self->{callback}->(@{ $self->{bound_params} }); | |||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||
| 137 | 11 | ▶ | if (ref $recordSet{fields} eq "ARRAY") { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 138 | 8 | $self->{fields} = $recordSet{fields}; | |||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||
| 141 | 11 | ▶ | if (ref $recordSet{rows} eq "ARRAY") { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 142 | 11 | $self->{return_data} = $recordSet{rows}; | |||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||
| 145 | 11 | ▶ | if (defined $recordSet{last_insert_id}) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 146 | 1 | $self->{last_insert_id} = $recordSet{last_insert_id}; | |||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||
| 151 | sub next_record { | ||||||||||||||||||||||||||||||||
| 152 | 171 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
next_record: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 153 | 171 | ▶ | return if $self->is_depleted; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 154 | 142 | my $rec_num = $self->current_record_num; | |||||||||||||||||||||||||||||||
| 155 | 142 | my $rec = $self->return_data->[$rec_num]; | |||||||||||||||||||||||||||||||
| 156 | 142 | $self->current_record_num( $rec_num + 1 ); | |||||||||||||||||||||||||||||||
| 157 | 142 | return $rec; | |||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||
| 160 | sub is_depleted { | ||||||||||||||||||||||||||||||||
| 161 | 190 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
is_depleted: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 162 | 190 | return ( $self->current_record_num >= scalar @{ $self->return_data } ); | |||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||
| 165 | # DEBUGGING AID | ||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||
| 167 | sub to_string { | ||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 169 | return join "\n" => ( | ||||||||||||||||||||||||||||||||
| 170 | $self->{statement}, | ||||||||||||||||||||||||||||||||
| 171 | 0 | "Values: [" . join( '] [', @{ $self->{bound_params} } ) . "]", | |||||||||||||||||||||||||||||||
| 172 | "Records: on $self->{current_record_num} of " | ||||||||||||||||||||||||||||||||
| 173 | 0 | . scalar( @{ $self->return_data } ) . "\n", | |||||||||||||||||||||||||||||||
| 174 | "Executed? $self->{is_executed}; Finished? $self->{is_finished}" | ||||||||||||||||||||||||||||||||
| 175 | ); | ||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||
| 178 | # PROPERTIES | ||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||
| 180 | # boolean | ||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||
| 182 | sub is_executed { | ||||||||||||||||||||||||||||||||
| 183 | 148 | ▶ | my ( $self, $yes_no ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
is_executed: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 184 | 148 | ▶ | $self->{is_executed} = $yes_no if defined $yes_no; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 185 | 148 | ▶ | return ( $self->{is_executed} eq 'yes' ) ? 'yes' : 'no'; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||
| 188 | # single-element fields | ||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||
| 190 | sub statement { | ||||||||||||||||||||||||||||||||
| 191 | 29 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
statement: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 192 | 29 | ▶ | $self->{statement} = $value if defined $value; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 193 | 29 | return $self->{statement}; | |||||||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||
| 196 | sub current_record_num { | ||||||||||||||||||||||||||||||||
| 197 | 664 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
current_record_num: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 198 | 664 | ▶ | $self->{current_record_num} = $value if defined $value; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 199 | 664 | return $self->{current_record_num}; | |||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||
| 202 | sub callback { | ||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | my ( $self, $callback ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
callback: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 204 | 0 | ▶ | $self->{callback} = $callback if defined $callback; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 205 | 0 | return $self->{callback}; | |||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||
| 208 | # multi-element fields | ||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||
| 210 | sub return_data { | ||||||||||||||||||||||||||||||||
| 211 | 335 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
return_data: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 212 | 335 | ▶ | push @{ $self->{return_data} }, @values if scalar @values; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 213 | 335 | return $self->{return_data}; | |||||||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||
| 216 | sub fields { | ||||||||||||||||||||||||||||||||
| 217 | 159 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
fields: called CC=3 SCAR=12.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||
| 219 | 159 | ▶ | $self->{fields} ||= []; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->{"fields"} ||= []
MC/DC0%0/1
$self->{"fields"} ||= []
$self->{"fields"}
Truth table50%1/2
A
A= $self->{"fields"}
| |||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||
| 221 | 159 | ▶ | push @{ $self->{fields} }, @values if scalar @values; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||
| 223 | 159 | return $self->{fields}; | |||||||||||||||||||||||||||||||
| 224 | } | ||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||
| 226 | sub bound_params { | ||||||||||||||||||||||||||||||||
| 227 | 83 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bound_params: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 228 | 83 | ▶ | push @{ $self->{bound_params} }, @values if scalar @values; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 229 | 83 | return $self->{bound_params}; | |||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||
| 232 | sub bound_param_attrs { | ||||||||||||||||||||||||||||||||
| 233 | 6 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
bound_param_attrs: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 234 | 6 | ▶ | push @{ $self->{bound_param_attrs} }, @values if scalar @values; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 235 | 6 | return $self->{bound_param_attrs}; | |||||||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||
| 238 | sub execution_history { | ||||||||||||||||||||||||||||||||
| 239 | 1 | ▶ | my ( $self, @values ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
execution_history: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 240 | 1 | ▶ | push @{ $self->{execution_history} }, @values if scalar @values; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 241 | 1 | return $self->{execution_history}; | |||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||
| 244 | 40 | 1; | |||||||||||||||||||||||||||||||