line |
true |
false |
branch |
34
|
54 |
60 |
if (wantarray) { } |
57
|
1 |
0 |
if (wantarray) { } |
171
|
3 |
12 |
ref $_[0] ? : |
174
|
1 |
14 |
unless my $file = shift() |
175
|
1 |
13 |
unless -e $file |
177
|
1 |
12 |
unless -f _ |
179
|
0 |
12 |
unless -r _ |
184
|
0 |
12 |
unless ($fh) |
189
|
12 |
0 |
if (_can_flock()) |
190
|
0 |
12 |
unless flock $fh, 1 |
200
|
2 |
10 |
if (my $err = $@) |
205
|
0 |
10 |
unless (close $fh) |
214
|
1 |
342 |
ref $_[0] ? : |
218
|
1 |
342 |
unless (defined $string) |
224
|
1 |
341 |
if (utf8::is_utf8($string) and not utf8::valid($string)) |
238
|
4 |
337 |
unless length $string |
245
|
3 |
334 |
if @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ |
251
|
278 |
83 |
if ($lines[0] =~ /^---\s*(?:(.+)\s*)?\z/) |
254
|
43 |
235 |
if (defined $1 and not $1 =~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/) |
262
|
12 |
306 |
if (not @lines or $lines[0] =~ /^(?:---|\.\.\.)/) { } |
|
2 |
304 |
elsif (not $in_document and @$self) { } |
|
66 |
238 |
elsif ($lines[0] =~ /^\s*\-(?:\s|$|-+$)/) { } |
|
238 |
0 |
elsif ($lines[0] =~ /^(\s*)\S/) { } |
299
|
15 |
328 |
if (ref $err eq 'SCALAR') { } |
|
0 |
328 |
elsif ($err) { } |
310
|
5 |
227 |
unless length $string |
317
|
1 |
86 |
unless length $string |
321
|
13 |
61 |
length $1 > 1 ? : |
333
|
38 |
892 |
if $string eq '~' |
336
|
185 |
707 |
if ($string =~ /^$re_capture_single_quoted$re_trailing_comment\z/) |
341
|
58 |
649 |
if ($string =~ /^$re_capture_double_quoted$re_trailing_comment\z/) |
346
|
2 |
647 |
if ($string =~ /^[\'\"!&]/) |
349
|
10 |
637 |
if $string =~ /^{}(?:\s+\#.*)?\z/ |
350
|
10 |
627 |
if $string =~ /^\[\](?:\s+\#.*)?\z/ |
353
|
614 |
13 |
unless ($string =~ /^[>|]/) |
354
|
8 |
606 |
if $string =~ /^(?:-(?:\s|$)|[\@\%\`])/ or $string =~ /:(?:\s|$)/ |
362
|
0 |
13 |
unless @$lines |
367
|
0 |
13 |
if (defined $indent->[-2] and $indent->[-1] <= $indent->[-2]) |
375
|
7 |
28 |
unless length $1 >= $indent->[-1] |
379
|
2 |
11 |
substr($string, 0, 1) eq '>' ? : |
380
|
2 |
11 |
substr($string, 1, 1) eq '-' ? : |
390
|
15 |
272 |
if ($lines->[0] =~ /^(?:---|\.\.\.)/) |
399
|
24 |
248 |
if (length $1 < $indent->[-1]) { } |
|
0 |
248 |
elsif (length $1 > $indent->[-1]) { } |
405
|
26 |
222 |
if ($lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/) { } |
|
38 |
184 |
elsif ($lines->[0] =~ /^\s*\-\s*\z/) { } |
|
180 |
4 |
elsif ($lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/) { } |
|
4 |
0 |
elsif (defined $indent->[-2] and $indent->[-1] == $indent->[-2]) { } |
414
|
2 |
36 |
unless (@$lines) |
418
|
4 |
32 |
if ($lines->[0] =~ /^(\s*)\-/) { } |
|
32 |
0 |
elsif ($lines->[0] =~ /^(\s*)\S/) { } |
420
|
4 |
0 |
if ($indent->[-1] == $indent2) { } |
472
|
3 |
1036 |
if ($lines->[0] =~ /^(?:---|\.\.\.)/) |
481
|
155 |
881 |
if (length $1 < $indent->[-1]) { } |
|
0 |
881 |
elsif (length $1 > $indent->[-1]) { } |
491
|
47 |
834 |
if ($lines->[0] =~ s/^\s*$re_capture_single_quoted$re_key_value_separator//) { } |
|
29 |
805 |
elsif ($lines->[0] =~ s/^\s*$re_capture_double_quoted$re_key_value_separator//) { } |
|
804 |
1 |
elsif ($lines->[0] =~ s/^\s*$re_capture_unquoted_key$re_key_value_separator//) { } |
|
0 |
1 |
elsif ($lines->[0] =~ /^\s*\?/) { } |
514
|
1 |
879 |
if (exists $hash->{$key}) |
519
|
707 |
173 |
if (length $lines->[0]) { } |
527
|
1 |
172 |
unless (@$lines) |
531
|
44 |
128 |
if ($lines->[0] =~ /^(\s*)-/) { } |
|
128 |
0 |
elsif ($lines->[0] =~ /^(\s*)./) { } |
538
|
6 |
122 |
if ($indent->[-1] >= $indent2) { } |
565
|
1 |
4 |
unless my $file = shift() |
569
|
4 |
0 |
if (_can_flock()) { } |
572
|
0 |
4 |
unless sysopen $fh, $file, $flags |
578
|
0 |
4 |
unless flock $fh, 2 |
593
|
0 |
4 |
unless (close $fh) |
603
|
4 |
265 |
unless ref $self and @$self |
614
|
7 |
271 |
if (not defined $cursor) { } |
|
19 |
252 |
elsif (not ref $cursor) { } |
|
33 |
219 |
elsif (ref $cursor eq 'ARRAY') { } |
|
219 |
0 |
elsif (ref $cursor eq 'HASH') { } |
623
|
1 |
32 |
unless (@$cursor) |
631
|
1 |
218 |
unless (%$cursor) |
642
|
1 |
264 |
if (ref $@ eq 'SCALAR') { } |
|
0 |
264 |
elsif ($@) { } |
662
|
24 |
1081 |
unless defined $string |
663
|
3 |
1078 |
unless length $string |
664
|
90 |
988 |
if (&Scalar::Util::looks_like_number($string)) |
666
|
56 |
34 |
if ($is_key or $has_string_flag) { } |
673
|
98 |
890 |
if ($string =~ /[\x00-\x09\x0b-\x0d\x0e-\x1f\x7f-\x9f\'\n]/) |
682
|
193 |
697 |
if ($string =~ /(?:^[~!\@#%&*|>?:,'"`{}\[\]]|^-+$|\s|:\z)/ or $QUOTE{$string}) |
692
|
0 |
55 |
if ($$seen{&refaddr($array)}++) |
699
|
94 |
33 |
if (not $type) { } |
|
1 |
32 |
elsif ($type eq 'ARRAY') { } |
|
32 |
0 |
elsif ($type eq 'HASH') { } |
704
|
0 |
1 |
if (@$el) { } |
713
|
31 |
1 |
if (keys %$el) { } |
731
|
1 |
309 |
if ($$seen{&refaddr($hash)}++) |
739
|
452 |
90 |
if (not $type) { } |
|
26 |
64 |
elsif ($type eq 'ARRAY') { } |
|
64 |
0 |
elsif ($type eq 'HASH') { } |
744
|
23 |
3 |
if (@$el) { } |
753
|
61 |
3 |
if (keys %$el) { } |
789
|
0 |
0 |
unless $errstr_warned++ |
811
|
13 |
3 |
if (defined $HAS_FLOCK) { } |
818
|
3 |
0 |
if $HAS_FLOCK |
832
|
12 |
0 |
if (eval {
do {
'Scalar::Util'->VERSION(1.18)
}
}) { } |