Branch Coverage

blib/lib/Linux/DVB/DVBT/Advert/Config.pm
Criterion Covered Total %
branch 52 222 23.4


line true false branch
606 12 0 if (exists $ENV{'HOME'} and defined $ENV{'HOME'})
612 0 12 if ($^O eq 'MSWin32') { }
0 12 elsif ($^O eq 'darwin') { }
0 12 elsif ($^O eq 'MacOS') { }
12 0 elsif ($^O eq 'linux' or $^O eq 'cygwin') { }
617 0 0 if (not $home and exists $ENV{'USERPROFILE'} and $ENV{'USERPROFILE'})
623 0 0 if (not $home and exists $ENV{'HOMEDRIVE'} and exists $ENV{'HOMEPATH'} and $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'})
629 0 0 if ($home and -d $home)
640 0 0 unless ($home)
646 0 0 if ($home and -d $home)
656 0 0 unless ($home)
664 0 0 if ($home and -d $home)
734 5 1 if (open my $fh, "<$fname")
741 606 468 if $line =~ /^\s*#/
743 16 452 if ($line =~ /\[([^]]+)\]/) { }
829 5 0 if $DEBUG
835 5 0 if $DEBUG
879 0 0 if $DEBUG
889 0 0 if (ref $val eq 'HASH') { }
893 0 0 if $subvar eq $METHOD_VAR
899 0 0 if $field eq $METHOD_VAR
924 0 0 unless open my $fh, ">$fname"
933 0 0 if ($section ne $ADVERT_GLOBAL_SECTION) { }
962 0 0 if (not $line or $line =~ /#/) { }
964 0 0 if $clear_buffer
976 0 0 if ($subvar) { }
978 0 0 if (exists $$val{$subvar} and defined $$val{$subvar})
983 0 0 if $comment
984 0 0 if $$commented_href{$section}{$field}{$subvar}
993 0 0 if (defined $val)
998 0 0 if $comment
999 0 0 if $$commented_href{$section}{$field}
1001 0 0 if ($field eq $METHOD_VAR) { }
1014 0 0 if ($printed)
1067 0 0 if ($val == 0) { }
1078 0 0 if ($val == $method_val)
1087 0 0 unless ($method_str)
1092 0 0 if ($val & $method_val)
1094 0 0 if $method_str
1100 0 0 unless ($method_str)
1116 0 84 if ($val =~ /^0x([\da-z]+)/i) { }
71 13 elsif ($val =~ /([\d]+)/) { }
1134 0 13 if $DEBUG >= 10
1137 0 13 if (defined $ival) { }
1142 0 0 if ($val)
1150 12 1 if ($val =~ /$METHOD_DISABLE_REGEXP/) { }
1168 0 1 if $DEBUG >= 10
1169 0 1 if ($token =~ /(\+|\-)/) { }
1171 0 0 if $DEBUG >= 10
1174 0 0 unless ($got_base)
1178 0 0 if $DEBUG >= 10
1180 0 0 if $DEBUG >= 10
1185 0 1 if $DEBUG >= 10
1186 0 1 if (exists $Linux::DVB::DVBT::Advert::Constants::CONSTANTS{'Advert'}{'detection_method'}{$method_key}) { }
1 0 elsif (exists $Linux::DVB::DVBT::Advert::Constants::CONSTANTS{'Advert'}{'detection_method_special'}{$method_key}) { }
1188 0 0 if $DEBUG >= 10
1189 0 0 if (not $op) { }
1194 0 0 if $DEBUG >= 10
1198 0 0 if ($op eq '+') { }
1209 0 0 if $DEBUG >= 10
1217 0 1 if $DEBUG >= 10
1222 0 1 if $DEBUG >= 10
1224 0 1 if $method < 0
1228 0 1 if $DEBUG >= 10
1231 0 13 if $DEBUG >= 10
1242 13 71 if ($var eq $METHOD_VAR) { }
1249 71 0 if (defined $ival)
1262 84 368 if ($line =~ /(\S+)\s*=\s*(\S+.*)/)
1266 43 41 if ($var =~ /([\w\d]+)\.([\w\d]+)/) { }
1297 0 0 if $DEBUG >= 10
1300 0 0 if ($key and exists $$defaults_href{$key}) { }
1313 0 0 if ($key and exists $$settings_href{$key}) { }
1321 0 0 if $DEBUG >= 10
1334 0 6 if $DEBUG >= 10
1342 0 6 if $DEBUG >= 10
1360 0 1 if $DEBUG >= 10
1368 0 1 if ($channel and exists $$advert_settings_href{$channel})
1376 0 1 if $DEBUG >= 10
1394 0 14 if ref $new_href ne 'HASH'
1399 39 40 if (ref $val eq 'HASH') { }
1424 0 0 if ref $new_href ne 'HASH'
1429 0 0 unless (ref $val)
1444 0 0 if ($field =~ /(\w+)\.(.*)/)
1459 0 0 if $subvar
1461 0 0 if (exists $SETTINGS_COMMENTS{$name}) { }
0 0 elsif ($subvar and exists $SETTINGS_COMMENTS{$subvar}) { }
1499 1 5 unless (-f "$d/$fname")
1505 5 1 if ($found)
1513 1 4 unless @found
1514 5 0 if $DEBUG
1535 0 0 if $DEBUG
1541 0 0 if $DEBUG
1544 0 0 unless (-d $d)
1550 0 0 if $@
1552 0 0 if $DEBUG
1555 0 0 if (-d $d)
1557 0 0 if $DEBUG
1560 0 0 if (open my $fh, ">>$d/$fname") { }
1563 0 0 if $DEBUG
1567 0 0 if $DEBUG
1573 0 0 if ($found)
1580 0 0 $dir ? :
0 0 if $DEBUG
1619 0 0 if (exists $$search_href{$channel_name}) { }
1648 0 0 if $DEBUG > 3
1650 0 0 if $DEBUG > 3
1655 0 0 if $DEBUG > 2
1664 0 0 if $DEBUG > 2
1665 0 0 if ($srch_chan eq $search)
1668 0 0 if $DEBUG
1673 0 0 if $found_channel_name