Branch Coverage

blib/lib/FR24/Utils.pm
Criterion Covered Total %
branch 27 70 38.5


line true false branch
16 0 0 unless (defined $fr24feed_status)
37 0 0 unless fr24_installed()
42 0 0 if ($line =~ /FR24 Radar: (.*)/u)
45 0 0 if ($line =~ /FR24 Tracked AC: (.*)/u)
48 0 0 if ($line =~ /FR24 Stats Timestamp: (.*)/u)
51 0 0 if ($line =~ /FR24 Link: (.*)/u)
54 0 0 if ($line =~ /FR24 MLAT AC seen: (.*)/u)
57 0 0 if ($line =~ m[FR24 Feeder/Decoder Process: (.*)]u)
64 2 1 if (defined $test and $test > 0)
77 0 3 if (length $json_text == 0)
86 1 2 if ($@)
92 2 0 if defined $json_data
94 0 2 unless (defined $json_data)
116 40 16 if length $info->[16] > 0
125 0 6 unless (-e "$filename")
128 0 6 unless open my $fh, "<", $filename
144 0 58 if $line =~ /^#/u
145 18 40 if ($line =~ /^\[(.*)\]$/u) { }
24 16 elsif ($line =~ /=/u) { }
161 0 9 unless defined $user
162 1 8 unless $user =~ /^[0-9]+$/u
164 0 8 unless (defined $config->{'users'})
168 4 4 if (defined $config->{'users'}{'everyone'})
171 1 7 if (defined $config->{'users'}{$user} and $config->{'users'}{$user} == 1)
175 2 6 if (defined $config->{'users'}{$user} and $config->{'users'}{$user} == 0)
182 0 1 unless open my $fh, ">", $filename
206 0 0 if ($response->{'success'}) { }
0 0 elsif ($response->{'status'} == 599) { }
220 0 0 if ($response->is_success)
229 0 0 if ($line =~ /^HTTP/u and $line =~ /200/u)
245 0 0 if ($? != 0)
252 0 0 unless defined $config->{'server'}{'port'}
253 0 0 unless defined $config->{'server'}{'ip'}
257 0 0 unless (defined $json_text)
265 0 0 if ($@)