line |
true |
false |
branch |
345
|
0 |
4 |
if (ref $parms{'-import'} and $parms{'-import'}->isa('CPANPLUS::YACSmoke::IniFiles')) { } |
|
0 |
4 |
elsif (defined $parms{'-import'}) { } |
364
|
4 |
0 |
if (defined($v = delete $parms{'-file'})) |
369
|
0 |
4 |
if (defined($v = delete $parms{'-nocase'})) |
370
|
0 |
0 |
$v ? : |
372
|
0 |
4 |
if (defined($v = delete $parms{'-default'})) |
373
|
0 |
0 |
$self->{'nocase'} ? : |
375
|
0 |
4 |
if (defined($v = delete $parms{'-fallback'})) |
376
|
0 |
0 |
$self->{'nocase'} ? : |
378
|
0 |
4 |
if (defined($v = delete $parms{'-reloadwarn'})) |
379
|
0 |
0 |
$v ? : |
381
|
0 |
4 |
if (defined($v = delete $parms{'-nomultiline'})) |
382
|
0 |
0 |
$v ? : |
384
|
0 |
4 |
if (defined($v = delete $parms{'-allowcontinue'})) |
385
|
0 |
0 |
$v ? : |
387
|
0 |
4 |
if (defined($v = delete $parms{'-allowempty'})) |
388
|
0 |
0 |
$v ? : |
390
|
0 |
4 |
if (defined($v = delete $parms{'-negativedeltas'})) |
391
|
0 |
0 |
$v ? : |
393
|
0 |
4 |
if (defined($v = delete $parms{'-commentchar'})) |
394
|
0 |
0 |
if (not defined $v or length $v != 1) { } |
|
0 |
0 |
elsif ($v =~ /[\[\]=\w]/) { } |
407
|
0 |
4 |
if (defined($v = delete $parms{'-allowedcommentchars'})) |
409
|
0 |
0 |
if (not defined $v or $v =~ /[\[\]=\w]/) { } |
417
|
4 |
0 |
unless exists $self->{'comment_char'} |
418
|
4 |
0 |
unless exists $self->{'allowed_comment_char'} |
430
|
0 |
4 |
if $errs |
432
|
4 |
0 |
if ($self->ReadConfig) { } |
462
|
0 |
11 |
unless defined $sect |
463
|
0 |
11 |
unless defined $parm |
465
|
0 |
11 |
if ($self->{'nocase'}) |
472
|
5 |
6 |
defined $self->{'v'}{$sect}{$parm} ? : |
475
|
6 |
5 |
unless defined $val |
478
|
8 |
3 |
if (wantarray) { } |
|
0 |
3 |
elsif (ref $val eq 'ARRAY') { } |
479
|
0 |
8 |
if (ref $val eq 'ARRAY') { } |
|
4 |
4 |
elsif (defined $val) { } |
487
|
0 |
0 |
if (defined $/) { } |
509
|
0 |
0 |
if ($self->{'nocase'}) |
534
|
0 |
0 |
unless defined $sect |
535
|
0 |
0 |
unless defined $parm |
537
|
0 |
0 |
if ($self->{'nocase'}) |
542
|
0 |
0 |
unless defined $self->{'v'}{$sect}{$parm} |
544
|
0 |
0 |
unless @vals |
549
|
0 |
0 |
unless defined $self->{'EOT'}{$sect}{$parm} |
552
|
0 |
0 |
unless ref $self->{'v'}{$sect}{$parm} eq 'ARRAY' |
576
|
0 |
0 |
unless defined $sect |
577
|
0 |
0 |
unless defined $parm |
579
|
0 |
0 |
if ($self->{'nocase'}) |
584
|
0 |
0 |
if (defined $self->{'v'}{$sect}{$parm}) { } |
586
|
0 |
0 |
if (@val > 1) { } |
612
|
0 |
5 |
unless defined $sect |
613
|
0 |
5 |
unless defined $parm |
615
|
0 |
5 |
if ($self->{'nocase'}) |
623
|
5 |
0 |
unless grep {/^\Q$parm\E$/;} @{$$self{'parms'}{$sect};} |
626
|
0 |
5 |
if (@val > 1) { } |
628
|
0 |
0 |
unless defined $self->{'EOT'}{$sect}{$parm} |
646
|
0 |
0 |
unless defined $sect |
647
|
0 |
0 |
unless defined $parm |
649
|
0 |
0 |
if ($self->{'nocase'}) |
679
|
0 |
0 |
unless (ref $ref) |
683
|
0 |
0 |
if (UNIVERSAL::isa($ref, 'ARRAY')) |
687
|
0 |
0 |
if (UNIVERSAL::isa($ref, 'HASH')) |
702
|
4 |
17 |
if (not exists $self->{'line_ends'}) { } |
710
|
0 |
36 |
unless defined $nextchar |
714
|
0 |
4 |
if ($nextchar eq "\r") |
717
|
0 |
0 |
if ($nextchar eq "\n") { } |
743
|
4 |
0 |
if (not ref $self->{'cf'}) { } |
774
|
0 |
4 |
if (defined $self->{'imported'}) |
779
|
0 |
0 |
unless $self->{'firstload'} |
789
|
0 |
4 |
if not exists $self->{'cf'} && defined $self->{'cf'} or $self->{'cf'} eq '' |
795
|
0 |
4 |
unless ($self->{'firstload'} or not $self->{'reloadwarn'}) |
807
|
0 |
4 |
unless ($fh) |
814
|
4 |
0 |
if (ref $fh ne 'IO::Scalar' and -e $fh) |
817
|
4 |
0 |
if defined $stats[2] |
830
|
0 |
9 |
if (/^\s*$/) { } |
|
0 |
9 |
elsif (/^\s*[$allCmt]/) { } |
|
4 |
5 |
elsif (/^\s*\[\s*(\S|\S.*\S)\s*\]\s*$/) { } |
|
5 |
0 |
elsif (($parm, $val) = /^\s*([^=]*?[^=\s])\s*=\s*(.*)$/) { } |
834
|
0 |
0 |
if ($self->{'negativedeltas'} and /^$self->{'comment_char'} (.*) is deleted$/) { } |
837
|
0 |
0 |
if ($todelete =~ /^\[(.*)\]$/) { } |
849
|
0 |
4 |
if ($self->{'nocase'}) |
857
|
0 |
5 |
if (not defined $sect and defined $self->{'fallback'}) |
862
|
0 |
5 |
unless (defined $sect) |
869
|
0 |
5 |
if $nocase |
872
|
4 |
1 |
if ($val =~ /^<<(.*)$/) { } |
879
|
4 |
4 |
if ($_ eq $eotmark) { } |
888
|
0 |
4 |
unless ($foundeot) |
906
|
0 |
5 |
if (exists $self->{'v'}{$sect}{$parm} and exists $self->{'myparms'}{$sect} and grep /^\Q$parm\E$/, @{$$self{'myparms'}{$sect};}) { } |
917
|
4 |
1 |
if defined $eotmark |
926
|
0 |
0 |
unless (keys %{$$self{'v'};} or $self->{'allowempty'}) |
932
|
0 |
4 |
if (defined(my $defaultsect = $self->{'startup_settings'}{'-default'})) |
939
|
0 |
4 |
@CPANPLUS::YACSmoke::IniFiles::errors ? : |
953
|
0 |
0 |
if ref $self->{'sects'} eq 'ARRAY' |
967
|
0 |
9 |
unless defined $sect |
969
|
0 |
9 |
if ($self->{'nocase'}) |
973
|
0 |
9 |
unless defined $sect |
974
|
5 |
4 |
if grep {/^\Q$sect\E$/;} @{$$self{'sects'};} |
993
|
0 |
9 |
unless defined $sect |
995
|
0 |
9 |
if ($self->{'nocase'}) |
999
|
5 |
4 |
if $self->SectionExists($sect) |
1001
|
4 |
0 |
unless grep /^\Q$sect\E$/, @{$$self{'sects'};} |
1007
|
4 |
0 |
unless ref $self->{'parms'}{$sect} eq 'ARRAY' |
1008
|
4 |
0 |
if (not defined $self->{'v'}{$sect}) |
1022
|
4 |
9 |
unless grep /^\Q$sect\E$/, @{$$self{'mysects'};} |
1030
|
0 |
9 |
unless exists $self->{'v'}{$sect} |
1033
|
5 |
4 |
unless grep /^\Q$parm\E$/, @{$$self{'myparms'}{$sect};} |
1047
|
0 |
0 |
unless defined $sect |
1049
|
0 |
0 |
if ($self->{'nocase'}) |
1064
|
0 |
0 |
if ($sect =~ /^(\S+)\s+\S+/) |
1066
|
0 |
0 |
if (defined $self->{'group'}{$group}) |
1085
|
0 |
0 |
unless defined $sect |
1087
|
0 |
0 |
if ($self->{'nocase'}) |
1091
|
0 |
0 |
if ref $self->{'parms'}{$sect} eq 'ARRAY' |
1112
|
0 |
0 |
if ref $self->{'group'} eq 'HASH' |
1128
|
0 |
4 |
unless defined $sect |
1130
|
4 |
0 |
unless $sect =~ /^(\S+)\s+\S+/ |
1133
|
0 |
0 |
unless (exists $self->{'group'}{$group}) |
1136
|
0 |
0 |
if (not grep({/^\Q$sect\E$/;} @{$$self{'group'}{$group};})) |
1152
|
0 |
0 |
unless defined $sect |
1154
|
0 |
0 |
unless $sect =~ /^(\S+)\s+\S+/ |
1157
|
0 |
0 |
unless exists $self->{'group'}{$group} |
1180
|
0 |
0 |
unless defined $group |
1182
|
0 |
0 |
if ($self->{'nocase'}) |
1186
|
0 |
0 |
if ref $self->{'group'}{$group} eq 'ARRAY' |
1202
|
0 |
0 |
unless defined $mode |
1203
|
0 |
0 |
unless $mode =~ /[0-7]{3,3}/ |
1219
|
0 |
0 |
unless exists $self->{'file_mode'} |
1244
|
0 |
0 |
unless %parms |
1246
|
0 |
0 |
unless defined $file |
1251
|
0 |
0 |
if (not ref $file) { } |
1252
|
0 |
0 |
if (-e $file) { } |
|
0 |
0 |
elsif (defined $self->{'file_mode'} and not oct $self->{'file_mode'} & 146) { } |
1253
|
0 |
0 |
unless (-w $file) |
1267
|
0 |
0 |
unless (open F, "> $new_file") |
1275
|
0 |
0 |
unless (rename $new_file, $file) |
1279
|
0 |
0 |
if (exists $self->{'file_mode'}) |
1290
|
0 |
0 |
unless ($fh) |
1297
|
0 |
0 |
if ($fh == \*STDIN) { } |
1326
|
0 |
0 |
if not exists $self->{'cf'} && defined $self->{'cf'} or $self->{'cf'} eq '' |
1345
|
0 |
0 |
if (exists $self->{'cf'}) { } |
1367
|
0 |
0 |
unless defined $newfile |
1369
|
0 |
0 |
if ($newfile ne '') |
1387
|
0 |
0 |
if (@$val <= 1 or $self->{'nomultiline'}) { } |
1422
|
0 |
0 |
$delta ? : |
1423
|
0 |
0 |
unless (defined $self->{'v'}{$sect}) |
1424
|
0 |
0 |
if ($delta) { } |
1427
|
0 |
0 |
if $^W |
1431
|
0 |
0 |
unless defined $self->{'v'}{$sect} |
1432
|
0 |
0 |
if $notfirst |
1434
|
0 |
0 |
if (ref $self->{'sCMT'}{$sect} eq 'ARRAY' and @cmts = @{$self->{'sCMT'}{$sect};}) |
1441
|
0 |
0 |
unless ($self->{'fallback_used'} and $sect eq $self->{'fallback'}) |
1447
|
0 |
0 |
unless ref $self->{'v'}{$sect} eq 'HASH' |
1450
|
0 |
0 |
$delta ? : |
1451
|
0 |
0 |
unless (defined $self->{'v'}{$sect}{$parm}) |
1452
|
0 |
0 |
if ($delta) { } |
1455
|
0 |
0 |
if $^W |
1459
|
0 |
0 |
if (ref $self->{'pCMT'}{$sect}{$parm} eq 'ARRAY' and @cmts = @{$self->{'pCMT'}{$sect}{$parm};}) |
1467
|
0 |
0 |
unless defined $val |
1478
|
0 |
0 |
ref $val eq 'ARRAY' ? : |
1506
|
0 |
4 |
unless defined $sect |
1507
|
4 |
0 |
unless @comment |
1509
|
0 |
0 |
if ($self->{'nocase'}) |
1534
|
0 |
0 |
unless /^\s*[$allCmt]/ |
1557
|
0 |
0 |
unless defined $sect |
1559
|
0 |
0 |
if ($self->{'nocase'}) |
1563
|
0 |
0 |
if (exists $self->{'sCMT'}{$sect}) { } |
1565
|
0 |
0 |
if (wantarray) { } |
1569
|
0 |
0 |
if (defined $/) { } |
1591
|
0 |
0 |
unless defined $sect |
1593
|
0 |
0 |
if ($self->{'nocase'}) |
1617
|
0 |
5 |
unless defined $sect |
1618
|
0 |
5 |
unless defined $parm |
1619
|
5 |
0 |
unless @comment |
1621
|
0 |
0 |
if ($self->{'nocase'}) |
1627
|
0 |
0 |
unless (exists $self->{'pCMT'}{$sect}) |
1667
|
0 |
0 |
unless defined $sect |
1668
|
0 |
0 |
unless defined $parm |
1670
|
0 |
0 |
if ($self->{'nocase'}) |
1675
|
0 |
0 |
unless exists $self->{'pCMT'}{$sect} |
1676
|
0 |
0 |
unless exists $self->{'pCMT'}{$sect}{$parm} |
1679
|
0 |
0 |
defined $/ ? : |
|
0 |
0 |
wantarray ? : |
1694
|
0 |
0 |
unless defined $sect |
1695
|
0 |
0 |
unless defined $parm |
1697
|
0 |
0 |
if ($self->{'nocase'}) |
1703
|
0 |
0 |
unless exists $self->{'pCMT'}{$sect} |
1704
|
0 |
0 |
unless exists $self->{'pCMT'}{$sect}{$parm} |
1723
|
0 |
0 |
unless defined $sect |
1724
|
0 |
0 |
unless defined $parm |
1726
|
0 |
0 |
if ($self->{'nocase'}) |
1731
|
0 |
0 |
unless (exists $self->{'EOT'}{$sect}) |
1735
|
0 |
0 |
unless (exists $self->{'EOT'}{$sect}{$parm}) |
1756
|
0 |
4 |
unless defined $sect |
1757
|
0 |
4 |
unless defined $parm |
1758
|
0 |
4 |
unless defined $EOT |
1760
|
0 |
4 |
if ($self->{'nocase'}) |
1766
|
3 |
1 |
unless (exists $self->{'EOT'}{$sect}) |
1787
|
0 |
0 |
unless defined $sect |
1788
|
0 |
0 |
unless defined $parm |
1790
|
0 |
0 |
if ($self->{'nocase'}) |
1997
|
0 |
0 |
if $self->{'nocase'} |
1998
|
0 |
0 |
unless $self->{'v'}{$key} |
2017
|
0 |
0 |
unless ref $ref eq 'HASH' |
2019
|
0 |
0 |
if $self->{'nocase'} |
2081
|
0 |
0 |
unless defined $key |
2082
|
0 |
0 |
wantarray ? : |
2137
|
0 |
4 |
if (ref $thing eq 'SCALAR') |
2138
|
0 |
0 |
if (eval {
do {
require IO::Scalar;
$IO::Scalar::VERSION >= 2.109
}
}) { } |
2141
|
0 |
0 |
if $^W |
2147
|
0 |
4 |
if defined fileno $thing |
2152
|
0 |
4 |
if defined fileno $fh |
2157
|
0 |
4 |
unless open $fh, $thing |
2231
|
0 |
0 |
@retval <= 1 ? : |
2341
|
0 |
0 |
unless defined $key |
2342
|
0 |
0 |
wantarray ? : |