| line |
true |
false |
branch |
| 193 |
3 |
27 |
if (ref $parms{-'import'} and $parms{-'import'}->isa('Config::IniFiles')) { } |
| 201 |
0 |
27 |
if (defined $parms{-'import'}) |
| 218 |
3 |
27 |
if (defined($v = delete $parms{'-import'})) |
| 220 |
2 |
1 |
if ($$self{'cf'}) { } |
| 226 |
26 |
4 |
if (defined($v = delete $parms{'-file'})) |
| 231 |
3 |
27 |
if (defined($v = delete $parms{'-default'})) |
| 234 |
3 |
27 |
if (defined($v = delete $parms{'-nocase'})) |
| 235 |
3 |
0 |
$v ? : |
| 237 |
0 |
30 |
if (defined($v = delete $parms{'-reloadwarn'})) |
| 238 |
0 |
0 |
$v ? : |
| 240 |
1 |
29 |
if (defined($v = delete $parms{'-allowcontinue'})) |
| 241 |
1 |
0 |
$v ? : |
| 243 |
1 |
29 |
if (defined($v = delete $parms{'-commentchar'})) |
| 244 |
0 |
1 |
if (not defined $v or length $v != 1) { } |
| |
0 |
1 |
elsif ($v =~ /[\[\]=\w]/) { } |
| 257 |
0 |
30 |
if (defined($v = delete $parms{'-allowedcommentchars'})) |
| 259 |
0 |
0 |
if (not defined $v or $v =~ /[\[\]=\w]/) { } |
| 267 |
26 |
4 |
unless exists $$self{'comment_char'} |
| 268 |
27 |
3 |
unless exists $$self{'allowed_comment_char'} |
| 278 |
0 |
30 |
if $errs |
| 283 |
4 |
26 |
if (not defined $$self{'cf'}) |
| 287 |
23 |
3 |
if ($self->ReadConfig) { } |
| 316 |
0 |
34 |
if not defined $sect |
| 317 |
0 |
34 |
if not defined $parm |
| 319 |
1 |
33 |
if ($$self{'nocase'}) |
| 324 |
30 |
4 |
defined $$self{'v'}{$sect}{$parm} ? : |
| 329 |
4 |
30 |
unless defined $val |
| 332 |
1 |
33 |
if (wantarray and ref $val eq 'ARRAY') { } |
| |
3 |
30 |
elsif (ref $val eq 'ARRAY') { } |
| 335 |
3 |
0 |
if (defined $/) { } |
| 363 |
0 |
2 |
if not defined $sect |
| 364 |
0 |
2 |
if not defined $parm |
| 367 |
1 |
1 |
if ($$self{'nocase'}) |
| 373 |
1 |
1 |
if (defined $$self{'v'}{$sect}{$parm}) { } |
| 374 |
0 |
1 |
if (@val > 1) { } |
| 400 |
0 |
7 |
if not defined $sect |
| 401 |
0 |
7 |
if not defined $parm |
| 404 |
0 |
7 |
if ($$self{'nocase'}) |
| 412 |
7 |
0 |
unless grep {/^\Q$parm\E$/;} @{$$self{'parms'}{$sect};} |
| 414 |
1 |
6 |
if (@val > 1) { } |
| 416 |
1 |
0 |
unless defined $$self{'EOT'}{$sect}{$parm} |
| 435 |
0 |
1 |
if not defined $sect |
| 436 |
0 |
1 |
if not defined $parm |
| 439 |
0 |
1 |
if ($$self{'nocase'}) |
| 475 |
4 |
35 |
if (@{$$self{'imported'};}) { } |
| 481 |
3 |
1 |
unless ($$self{'firstload'}) |
| 496 |
0 |
39 |
if not exists $$self{'cf'} or not defined $$self{'cf'} or $$self{'cf'} eq '' |
| 504 |
0 |
39 |
unless ($$self{'firstload'} or not $$self{'reloadwarn'}) |
| 516 |
0 |
39 |
if (not $fh) |
| 523 |
39 |
0 |
if defined $stats[2] |
| 531 |
1 |
38 |
if (not ref $fh) { } |
| 535 |
38 |
0 |
if ($fh != 0) |
| 556 |
1 |
77 |
if /^\s*$/ |
| 557 |
39 |
38 |
if /^\s*[$allCmt]/ |
| 561 |
2 |
37 |
unless ($first =~ /^\s*\[/) |
| 572 |
232 |
941 |
if (/^\s*$/) { } |
| |
90 |
851 |
elsif (/^\s*[$allCmt]/) { } |
| |
264 |
587 |
elsif (/^\s*\[\s*(\S|\S.*\S)\s*\]\s*$/) { } |
| |
586 |
1 |
elsif (($parm, $val) = /^\s*([^=]*?[^=\s])\s*=\s*(.*)$/) { } |
| 581 |
68 |
196 |
if ($$self{'nocase'}) |
| 589 |
124 |
462 |
if $nocase |
| 592 |
111 |
475 |
if ($val =~ /^<<(.*)$/) { } |
| 601 |
111 |
324 |
if ($_ eq $eotmark) { } |
| 608 |
111 |
0 |
if ($foundeot) { } |
| 609 |
15 |
96 |
if (exists $$self{'v'}{$sect}{$parm} and exists $loaded_params{$sect} and grep /^\Q$parm\E$/, @{$loaded_params{$sect};}) { } |
| 612 |
0 |
15 |
if (ref $$self{'v'}{$sect}{$parm} eq 'ARRAY') { } |
| 623 |
66 |
30 |
unless $loaded_params{$sect} |
| 642 |
60 |
415 |
if (exists $$self{'v'}{$sect}{$parm} and exists $loaded_params{$sect} and grep /^\Q$parm\E$/, @{$loaded_params{$sect};}) { } |
| 645 |
30 |
30 |
if (ref $$self{'v'}{$sect}{$parm} eq 'ARRAY') { } |
| 656 |
197 |
218 |
unless $loaded_params{$sect} |
| 660 |
488 |
98 |
unless grep /^\Q$parm\E$/, @{$$self{'parms'}{$sect};} |
| 672 |
7 |
30 |
if (defined $parms{-'default'}) |
| 674 |
1 |
6 |
unless (defined $$self{'v'}{$parms{-'default'}}) |
| 676 |
1 |
0 |
unless grep /^\Q$parms{-'default'}\E$/, @{$$self{'sects'};} |
| 689 |
1 |
36 |
@errors ? : |
| 703 |
2 |
0 |
if ref $$self{'sects'} eq 'ARRAY' |
| 717 |
0 |
273 |
if not defined $sect |
| 719 |
68 |
205 |
if ($$self{'nocase'}) |
| 723 |
0 |
273 |
if not defined $sect |
| 724 |
12 |
261 |
if grep {/^\Q$sect\E$/;} @{$$self{'sects'};} |
| 743 |
0 |
273 |
if not defined $sect |
| 745 |
68 |
205 |
if ($$self{'nocase'}) |
| 749 |
12 |
261 |
if $self->SectionExists($sect) |
| 754 |
166 |
95 |
unless ref $$self{'parms'}{$sect} eq 'ARRAY' |
| 755 |
261 |
0 |
if (not defined $$self{'v'}{$sect}) |
| 773 |
0 |
1 |
if not defined $sect |
| 775 |
0 |
1 |
if ($$self{'nocase'}) |
| 788 |
0 |
1 |
if ($sect =~ /^(\S+)\s+\S+/) |
| 790 |
0 |
0 |
if (defined $$self{'group'}{$group}) |
| 809 |
0 |
2 |
if not defined $sect |
| 811 |
0 |
2 |
if ($$self{'nocase'}) |
| 815 |
1 |
1 |
if ref $$self{'parms'}{$sect} eq 'ARRAY' |
| 836 |
1 |
0 |
if ref $$self{'group'} eq 'HASH' |
| 852 |
0 |
261 |
if not defined $sect |
| 854 |
163 |
98 |
unless $sect =~ /^(\S+)\s+\S+/ |
| 857 |
49 |
49 |
if (not exists $$self{'group'}{$group}) |
| 860 |
98 |
0 |
if (not grep {/^\Q$sect\E$/;} @{$$self{'group'}{$group};}) |
| 876 |
0 |
0 |
if not defined $sect |
| 878 |
0 |
0 |
unless $sect =~ /^(\S+)\s+\S+/ |
| 881 |
0 |
0 |
unless exists $$self{'group'}{$group} |
| 904 |
0 |
0 |
if not defined $group |
| 906 |
0 |
0 |
if ($$self{'nocase'}) |
| 910 |
0 |
0 |
if ref $$self{'group'}{$group} eq 'ARRAY' |
| 926 |
0 |
5 |
if not defined $mode |
| 927 |
0 |
5 |
if not $mode =~ /[0-7]{3,3}/ |
| 943 |
0 |
0 |
if not exists $$self{'file_mode'} |
| 961 |
0 |
14 |
unless defined $file |
| 965 |
13 |
1 |
if (not ref $file) { } |
| 966 |
6 |
7 |
if (-e $file) { } |
| |
1 |
6 |
elsif (defined $$self{'file_mode'} and not oct $$self{'file_mode'} & 146) { } |
| 967 |
1 |
5 |
if (not -w $file) |
| 981 |
0 |
12 |
unless (open F, "> $new_file") |
| 989 |
0 |
12 |
unless (rename $new_file, $file) |
| 993 |
11 |
1 |
if (exists $$self{'file_mode'}) |
| 1004 |
0 |
1 |
if (not $fh) |
| 1011 |
0 |
1 |
if ($fh == 0) { } |
| 1038 |
0 |
12 |
if not exists $$self{'cf'} or not defined $$self{'cf'} or $$self{'cf'} eq '' |
| 1059 |
2 |
0 |
if (exists $$self{'cf'}) { } |
| 1081 |
0 |
10 |
if not defined $newfile |
| 1083 |
10 |
0 |
if ($newfile ne '') |
| 1103 |
0 |
111 |
unless defined $$self{'v'}{$sect} |
| 1104 |
99 |
12 |
if $notfirst |
| 1106 |
22 |
89 |
if (ref $$self{'sCMT'}{$sect} eq 'ARRAY' and @cmts = @{$$self{'sCMT'}{$sect};}) |
| 1113 |
0 |
111 |
unless ref $$self{'v'}{$sect} eq 'HASH' |
| 1116 |
9 |
171 |
if (ref $$self{'pCMT'}{$sect}{$parm} eq 'ARRAY' and @cmts = @{$$self{'pCMT'}{$sect}{$parm};}) |
| 1124 |
1 |
179 |
if not defined $val |
| 1125 |
58 |
121 |
if (ref $val eq 'ARRAY') { } |
| |
0 |
121 |
elsif ($val =~ /[$ors]/) { } |
| 1137 |
0 |
0 |
if (@val > 1) { } |
| 1172 |
0 |
266 |
if not defined $sect |
| 1173 |
212 |
54 |
unless @comment |
| 1175 |
14 |
40 |
if ($$self{'nocase'}) |
| 1199 |
7 |
64 |
unless /^\s*[$allCmt]/ |
| 1222 |
0 |
7 |
if not defined $sect |
| 1224 |
0 |
7 |
if ($$self{'nocase'}) |
| 1228 |
4 |
3 |
if (exists $$self{'sCMT'}{$sect}) { } |
| 1246 |
0 |
2 |
if not defined $sect |
| 1248 |
0 |
2 |
if ($$self{'nocase'}) |
| 1271 |
0 |
1 |
unless defined $sect |
| 1272 |
0 |
1 |
unless defined $parm |
| 1273 |
0 |
1 |
unless @comment |
| 1275 |
0 |
1 |
if ($$self{'nocase'}) |
| 1280 |
1 |
0 |
if (not exists $$self{'pCMT'}{$sect}) |
| 1303 |
0 |
3 |
unless defined $sect |
| 1304 |
0 |
3 |
unless defined $parm |
| 1306 |
0 |
3 |
if ($$self{'nocase'}) |
| 1311 |
0 |
3 |
unless exists $$self{'pCMT'}{$sect} |
| 1312 |
0 |
3 |
unless exists $$self{'pCMT'}{$sect}{$parm} |
| 1315 |
2 |
1 |
wantarray ? : |
| 1330 |
0 |
1 |
unless defined $sect |
| 1331 |
0 |
1 |
unless defined $parm |
| 1333 |
0 |
1 |
if ($$self{'nocase'}) |
| 1339 |
0 |
1 |
unless exists $$self{'pCMT'}{$sect} |
| 1340 |
0 |
1 |
unless exists $$self{'pCMT'}{$sect}{$parm} |
| 1358 |
0 |
0 |
unless defined $sect |
| 1359 |
0 |
0 |
unless defined $parm |
| 1361 |
0 |
0 |
if ($$self{'nocase'}) |
| 1366 |
0 |
0 |
if (not exists $$self{'EOT'}{$sect}) |
| 1370 |
0 |
0 |
if (not exists $$self{'EOT'}{$sect}{$parm}) |
| 1391 |
0 |
0 |
unless defined $sect |
| 1392 |
0 |
0 |
unless defined $parm |
| 1393 |
0 |
0 |
unless defined $EOT |
| 1395 |
0 |
0 |
if ($$self{'nocase'}) |
| 1400 |
0 |
0 |
if (not exists $$self{'EOT'}{$sect}) |
| 1421 |
0 |
0 |
unless defined $sect |
| 1422 |
0 |
0 |
unless defined $parm |
| 1424 |
0 |
0 |
if ($$self{'nocase'}) |
| 1638 |
24 |
3 |
if $$self{'nocase'} |
| 1654 |
0 |
4 |
unless ref $ref eq 'HASH' |
| 1656 |
2 |
2 |
if $$self{'nocase'} |
| 1662 |
2 |
2 |
unless grep {/^\Q$key\E$/;} @{$$self{'sects'};} |
| 1669 |
2 |
2 |
if defined $parms{-'default'} and defined $$self{'v'}{$parms{-'default'}} |
| 1685 |
1 |
0 |
if $$self{'nocase'} |
| 1692 |
0 |
1 |
if ($key =~ /(\S+)\s+\S+/) |
| 1694 |
0 |
0 |
if (defined $$self{'group'}{$group}) |
| 1753 |
0 |
0 |
if $$self{'nocase'} |
| 1796 |
9 |
31 |
if defined fileno $thing |
| 1801 |
0 |
31 |
if defined fileno $fh |
| 1806 |
0 |
31 |
unless open $fh, $thing |
| 1904 |
99 |
223 |
if $$self{'nocase'} |
| 1908 |
11 |
311 |
unless (defined $$self{'v'}{$key}) |
| 1909 |
8 |
3 |
if ref $$self{'default'} eq 'HASH' |
| 1934 |
9 |
32 |
if $$self{'nocase'} |
| 1937 |
10 |
31 |
unless grep /^\Q$key\E$/, @{$$self{'parms'};} |
| 1939 |
0 |
41 |
if (@val > 1) { } |
| 1965 |
1 |
1 |
if $$self{'nocase'} |
| 2005 |
0 |
28 |
if $$self{'nocase'} |