| line |
true |
false |
branch |
|
26
|
98 |
4773 |
if (@_) |
|
28
|
10 |
88 |
shift @_ ? : |
|
60
|
9 |
79 |
if (ref $parms{'-import'} and $parms{'-import'}->isa('Config::IniFiles')) { } |
|
|
0 |
79 |
elsif (defined $parms{'-import'}) { } |
|
82
|
71 |
17 |
if (defined($v = delete $parms{'-file'})) |
|
88
|
10 |
78 |
if (defined($v = delete $parms{'-nocase'})) |
|
92
|
7 |
81 |
if (defined($v = delete $parms{'-default'})) |
|
94
|
7 |
0 |
$self->_nocase ? : |
|
96
|
1 |
87 |
if (defined($v = delete $parms{'-fallback'})) |
|
98
|
0 |
1 |
$self->_nocase ? : |
|
100
|
0 |
88 |
if (defined($v = delete $parms{'-reloadwarn'})) |
|
102
|
0 |
0 |
$v ? : |
|
104
|
1 |
87 |
if (defined($v = delete $parms{'-nomultiline'})) |
|
106
|
1 |
0 |
$v ? : |
|
108
|
1 |
87 |
if (defined($v = delete $parms{'-allowcontinue'})) |
|
110
|
1 |
0 |
$v ? : |
|
112
|
11 |
77 |
if (defined($v = delete $parms{'-allowempty'})) |
|
114
|
11 |
0 |
$v ? : |
|
116
|
0 |
88 |
if (defined($v = delete $parms{'-negativedeltas'})) |
|
118
|
0 |
0 |
$v ? : |
|
120
|
2 |
86 |
if (defined($v = delete $parms{'-commentchar'})) |
|
122
|
0 |
2 |
if (not defined $v or length $v != 1) { } |
|
|
0 |
2 |
elsif ($v =~ /[\[\]=\w]/) { } |
|
138
|
2 |
86 |
if (defined($v = delete $parms{'-allowedcommentchars'})) |
|
141
|
0 |
2 |
if (not defined $v or $v =~ /[\[\]=\w]/) { } |
|
152
|
4 |
84 |
if (defined($v = delete $parms{'-handle_trailing_comment'})) |
|
154
|
3 |
1 |
$v ? : |
|
156
|
1 |
87 |
if (defined($v = delete $parms{'-php_compat'})) |
|
158
|
1 |
0 |
$v ? : |
|
161
|
86 |
2 |
unless exists $self->{'comment_char'} |
|
163
|
86 |
2 |
unless exists $self->{'allowed_comment_char'} |
|
177
|
0 |
88 |
if $errs |
|
179
|
83 |
5 |
if ($self->ReadConfig) { } |
|
194
|
1348 |
3417 |
if ($self->_nocase) |
|
202
|
27 |
4738 |
if ($self->{'php_compat'}) |
|
210
|
2 |
2 |
if (length ${$ref;} >= 2) |
|
213
|
2 |
0 |
if ($quote eq '"' || $quote eq q['] and substr(${$ref;}, -1, 1) eq $quote) |
|
218
|
1 |
1 |
if $quote eq "\"" |
|
232
|
0 |
110 |
unless (defined $sect and defined $parm) |
|
242
|
98 |
12 |
defined $self->{'v'}{$sect}{$parm} ? : |
|
247
|
7 |
103 |
unless (defined $val) |
|
253
|
34 |
76 |
if (wantarray) { } |
|
|
5 |
71 |
elsif (ref $val eq 'ARRAY') { } |
|
255
|
12 |
22 |
if (ref $val eq 'ARRAY') { } |
|
|
20 |
2 |
elsif (defined $val) { } |
|
270
|
5 |
0 |
defined $/ ? : |
|
293
|
0 |
92 |
unless defined $sect |
|
294
|
0 |
92 |
unless defined $parm |
|
298
|
0 |
92 |
unless defined $self->{'v'}{$sect}{$parm} |
|
300
|
0 |
92 |
unless @vals |
|
305
|
56 |
36 |
unless defined $self->{'EOT'}{$sect}{$parm} |
|
308
|
56 |
36 |
unless ref $self->{'v'}{$sect}{$parm} eq "ARRAY" |
|
322
|
0 |
2 |
unless defined $sect |
|
323
|
0 |
2 |
unless defined $parm |
|
327
|
1 |
1 |
if (defined $self->{'v'}{$sect}{$parm}) { } |
|
330
|
0 |
1 |
if (@val > 1) { } |
|
355
|
0 |
640 |
unless defined $sect |
|
356
|
0 |
640 |
unless defined $parm |
|
362
|
613 |
27 |
if (&none(sub {
$_ eq $parm;
}
, @{$$self{"parms"}{$sect};})) |
|
368
|
112 |
528 |
if (@val > 1) { } |
|
371
|
105 |
7 |
unless (defined $self->{'EOT'}{$sect}{$parm}) |
|
390
|
0 |
6 |
unless defined $sect |
|
391
|
0 |
6 |
unless defined $parm |
|
410
|
206 |
205 |
unless (ref $ref) |
|
415
|
64 |
141 |
if (UNIVERSAL::isa($ref, "ARRAY")) |
|
420
|
141 |
0 |
if (UNIVERSAL::isa($ref, "HASH")) |
|
438
|
85 |
1984 |
if (not exists $self->{'line_ends'}) { } |
|
448
|
12 |
1123 |
unless defined $nextchar |
|
452
|
4 |
69 |
if ($nextchar eq "\r") |
|
456
|
3 |
1 |
if ($nextchar eq "\n") { } |
|
489
|
71 |
14 |
if (not ref $self->{'cf'}) { } |
|
491
|
0 |
71 |
unless close $fh |
|
513
|
2071 |
2121 |
if (@_) |
|
528
|
83 |
1986 |
unless (defined $line) |
|
555
|
422 |
5181 |
if (@_) |
|
568
|
777 |
3003 |
if (@_) |
|
589
|
810 |
1285 |
if (@_) |
|
601
|
1112 |
1226 |
if (@_) |
|
613
|
1256 |
691 |
if (@_) |
|
628
|
2 |
118 |
if ($self->{'negativedeltas'} and my($to_delete) = $line =~ /\A$self->{'comment_char'} (.*) is deleted\z/) { } |
|
632
|
1 |
1 |
if (my($sect) = $to_delete =~ /\A\[(.*)\]\z/) { } |
|
667
|
1 |
693 |
if (not defined $self->_curr_sect and defined $self->{'fallback'}) |
|
681
|
92 |
599 |
if (exists $self->{'v'}{$self->_curr_sect}{$self->_curr_parm} and exists $self->{'myparms'}{$self->_curr_sect} and $self->_is_parm_in_sect($self->_curr_loc)) { } |
|
703
|
2 |
692 |
unless (defined $self->_curr_sect) |
|
727
|
129 |
369 |
if ($line eq $eotmark) { } |
|
740
|
1 |
129 |
unless ($foundeot) |
|
764
|
4 |
558 |
if ($end_commenthandle and my($value_to_assign, $end_comment_to_assign) = $self->_curr_val =~ /(.*?)\s*[$allCmt]\s*(.*)$/) { } |
|
789
|
129 |
562 |
if (defined $eotmark) |
|
810
|
2 |
692 |
unless (defined $self->_test_for_fallback_or_no_sect($fh)) |
|
821
|
130 |
562 |
if (($eotmark) = $self->_curr_val =~ /\A<<(.*)$/) { } |
|
823
|
1 |
129 |
unless (defined $self->_ReadConfig_handle_here_doc_param($fh, $eotmark, \@val)) |
|
852
|
333 |
1153 |
if ($line =~ /\A\s*\z/) |
|
858
|
120 |
1033 |
if ($line =~ /\A\s*[$allCmt]/) |
|
864
|
336 |
697 |
if (my($sect) = $line =~ /\A\s*\[\s*(\S|\S.*\S)\s*\]\s*\z/) |
|
870
|
694 |
3 |
if (my($parm, $value_to_assign) = $line =~ /^\s*([^=]*?[^=\s])\s*=\s*(.*)$/) |
|
899
|
3 |
1483 |
unless (defined scalar $self->_ReadConfig_handle_line($fh, $line)) |
|
932
|
13 |
89 |
if (defined $self->{'imported'}) |
|
940
|
17 |
85 |
if ($self->_no_filename) |
|
946
|
0 |
85 |
if ($self->{'reloadwarn'}) |
|
956
|
0 |
85 |
unless ($fh) |
|
964
|
81 |
4 |
if (ref $fh ne "IO::Scalar" and -e $fh) |
|
966
|
68 |
13 |
unless (exists $self->{'file_mode'}) |
|
969
|
68 |
0 |
if defined $stats[2] |
|
981
|
3 |
82 |
unless (defined $self->_ReadConfig_lines_loop($fh)) |
|
988
|
1 |
4 |
unless (keys %{$$self{"v"};} or $self->{'allowempty'}) |
|
995
|
11 |
70 |
if (defined(my $defaultsect = $self->{'startup_settings'}{'-default'})) |
|
1003
|
1 |
80 |
@Config::IniFiles::errors ? : |
|
1020
|
0 |
1001 |
unless defined $sect |
|
1024
|
643 |
358 |
exists $self->{'e'}{$sect} ? : |
|
1040
|
356 |
1 |
unless (defined $self->{'v'}{$sect}) |
|
1055
|
0 |
993 |
unless defined $sect |
|
1059
|
638 |
355 |
if ($self->SectionExists($sect)) |
|
1074
|
366 |
1533 |
unless (exists $self->{'mye'}{$sect}) |
|
1089
|
0 |
1463 |
unless exists $self->{'v'}{$sect} |
|
1092
|
639 |
824 |
unless ($self->_is_parm_in_sect($sect, $parm)) |
|
1106
|
0 |
7 |
unless defined $sect |
|
1135
|
0 |
1 |
unless $self->CopySection($old_sect, $new_sect, $include_groupmembers) |
|
1149
|
0 |
2 |
if (not defined $old_sect && defined $new_sect && $self->SectionExists($old_sect) or $self->SectionExists($new_sect)) |
|
1163
|
3 |
11 |
unless exists $self->{$key}{$old_sect} |
|
1168
|
0 |
2 |
if ($include_groupmembers) |
|
1186
|
28 |
4 |
defined $aref && ref $aref eq 'ARRAY' ? : |
|
1194
|
0 |
22 |
unless defined $sect |
|
1206
|
2 |
0 |
if (ref $self->{'group'} eq 'HASH') { } |
|
1221
|
0 |
364 |
unless defined $sect |
|
1223
|
237 |
127 |
if (not my($group) = $sect =~ /\A(\S+)\s+\S/) { } |
|
1237
|
69 |
58 |
unless (exists $self->{'group'}{$group}) |
|
1242
|
127 |
0 |
if (&none(sub {
$_ eq $sect;
}
, @{$$self{"group"}{$group};})) |
|
1263
|
0 |
0 |
unless (exists $self->{'group'}{$group}) |
|
1287
|
0 |
6 |
unless defined $group |
|
1299
|
0 |
5 |
unless (defined $mode and $mode =~ /[0-7]{3}/) |
|
1320
|
8 |
16 |
if (-e $filename) |
|
1322
|
0 |
8 |
unless (-w $filename) |
|
1327
|
1 |
7 |
unless (exists $self->{'file_mode'}) |
|
1351
|
0 |
24 |
if ($^O =~ /\AMSWin/) |
|
1357
|
0 |
24 |
if ($@) |
|
1364
|
0 |
24 |
unless close $fh |
|
1365
|
0 |
24 |
unless (rename $new_file, $filename) |
|
1370
|
20 |
4 |
if (exists $self->{'file_mode'}) |
|
1372
|
0 |
20 |
unless (chmod oct $self->{'file_mode'}, $filename) |
|
1386
|
0 |
3 |
if ($fh == \*STDIN) { } |
|
1415
|
0 |
3 |
unless ($fh) |
|
1428
|
0 |
27 |
unless defined $file |
|
1432
|
24 |
3 |
if (not ref $file) { } |
|
1450
|
0 |
16 |
if ($self->_no_filename) |
|
1471
|
12 |
0 |
if (length $new_filename > 0) { } |
|
1510
|
1 |
202 |
$end_comment ? : |
|
1517
|
10 |
203 |
if (not @$val) { } |
|
|
138 |
65 |
elsif (@$val == 1 or $self->{'nomultiline'}) { } |
|
1550
|
169 |
204 |
if (ref $comments_aref eq "ARRAY") |
|
1565
|
535 |
27 |
unless ($self->{'allowcontinue'}) |
|
1585
|
1 |
213 |
unless (defined $self->{'v'}{$sect}{$parm}) |
|
1587
|
1 |
0 |
if ($delta) { } |
|
1593
|
0 |
0 |
if $^W |
|
1603
|
0 |
213 |
unless defined $val |
|
1605
|
154 |
59 |
defined $end_comment ? : |
|
1615
|
1 |
132 |
unless (defined $self->{'v'}{$sect}) |
|
1617
|
1 |
0 |
if ($delta) { } |
|
1623
|
0 |
0 |
if $^W |
|
1627
|
0 |
132 |
unless defined $self->{'v'}{$sect} |
|
1628
|
106 |
26 |
if $position > 0 |
|
1631
|
131 |
1 |
unless ($self->{'fallback_used'} and $sect eq $self->{'fallback'}) |
|
1635
|
0 |
132 |
if ref $self->{'v'}{$sect} ne "HASH" |
|
1637
|
7 |
125 |
$delta ? : |
|
1658
|
0 |
751 |
unless print {$fh;} @_, $ors |
|
1667
|
64 |
149 |
ref $val eq 'ARRAY' ? : |
|
1675
|
3 |
25 |
$delta ? : |
|
1691
|
268 |
70 |
unless (defined $sect and @comment) |
|
1719
|
110 |
7 |
$_ =~ /$is_comment/ ? : |
|
1727
|
9 |
0 |
defined $/ ? : |
|
1729
|
6 |
3 |
wantarray ? : |
|
1736
|
0 |
8 |
unless defined $sect |
|
1740
|
3 |
5 |
unless (exists $self->{'sCMT'}{$sect}) |
|
1754
|
0 |
2 |
unless defined $sect |
|
1769
|
661 |
31 |
unless (defined $sect and defined $parm and @comment) |
|
1807
|
0 |
4 |
unless (defined $sect and defined $parm) |
|
1814
|
0 |
4 |
unless (exists $self->{'pCMT'}{$sect} and exists $self->{'pCMT'}{$sect}{$parm}) |
|
1830
|
0 |
1 |
unless (defined $sect and defined $parm) |
|
1838
|
1 |
0 |
if (exists $self->{'pCMT'}{$sect} and exists $self->{'pCMT'}{$sect}{$parm}) |
|
1853
|
0 |
0 |
unless (defined $sect and defined $parm) |
|
1868
|
0 |
129 |
unless (defined $sect and defined $parm and defined $EOT) |
|
1887
|
0 |
0 |
unless (defined $sect and defined $parm) |
|
1905
|
129 |
563 |
unless (defined $sect and defined $parm and defined $cmt) |
|
1913
|
0 |
563 |
unless exists $self->{'v'}{$sect}{$parm} |
|
1926
|
0 |
5 |
unless (defined $sect and defined $parm) |
|
1934
|
0 |
5 |
unless exists $self->{'v'}{$sect}{$parm} |
|
1995
|
1 |
32 |
unless $self->{'v'}{$key} |
|
1998
|
21 |
11 |
if exists $self->{'_section_cache'}{$key} |
|
2018
|
0 |
4 |
unless ref $ref eq "HASH" |
|
2084
|
1 |
10 |
unless defined $key |
|
2085
|
0 |
10 |
wantarray ? : |
|
2140
|
3 |
90 |
if (ref $thing eq "SCALAR") |
|
2142
|
3 |
0 |
if (eval {
do {
require IO::Scalar;
$IO::Scalar::VERSION >= 2.109
}
}) { } |
|
2148
|
0 |
0 |
if $^W |
|
2155
|
15 |
75 |
if defined fileno $thing |
|
2159
|
0 |
75 |
if defined fileno $fh |
|
2164
|
4 |
71 |
unless open $fh, "<", $thing |
|
2243
|
18 |
4 |
@retval <= 1 ? : |
|
2357
|
3 |
10 |
unless defined $key |
|
2358
|
0 |
10 |
wantarray ? : |