line |
true |
false |
branch |
46
|
4 |
142 |
if (not $self->use_header and $self->document == 1) |
49
|
1 |
3 |
unless ref($node) =~ /^(HASH|ARRAY)$/ |
51
|
1 |
2 |
if ref $node eq 'HASH' and keys %$node == 0 |
53
|
1 |
1 |
if ref $node eq 'ARRAY' and @$node == 0 |
61
|
0 |
142 |
if ($self->use_version) |
75
|
4 |
1395 |
if ($type eq 'GLOB') |
83
|
5 |
1390 |
if (ref $_[0] eq 'Regexp') |
89
|
885 |
505 |
unless (ref $_[0]) |
90
|
0 |
885 |
if $self->purity |
99
|
2 |
503 |
if ref $value and not $type |
102
|
10 |
493 |
if ($self->transferred->{$node_id}) |
103
|
8 |
2 |
ref $self->transferred->{$node_id} ? : |
111
|
6 |
487 |
if ($type eq 'CODE') |
125
|
32 |
455 |
if (defined $class) |
126
|
5 |
27 |
if ($value->can('yaml_dump')) { } |
|
7 |
20 |
elsif ($type eq 'SCALAR') { } |
147
|
4 |
476 |
if (defined 'YAML::Old'->global_object->{'blessed_map'}{$node_id}) |
156
|
31 |
445 |
if ($type eq 'REF' or $type eq 'SCALAR') { } |
|
1 |
444 |
elsif ($type eq 'GLOB') { } |
177
|
3 |
472 |
if ++$$self{'id_refcnt'}{$node_id} > 1 |
180
|
415 |
57 |
if ($type eq 'HASH') { } |
|
57 |
0 |
elsif ($type eq 'ARRAY') { } |
212
|
501 |
889 |
if ($ref) { } |
213
|
5 |
496 |
if ($ref eq 'Regexp') |
228
|
88 |
1297 |
if (defined $self->transferred->{$node_id}) { } |
|
3 |
1294 |
elsif ($ynode = ynode($value)) { } |
231
|
73 |
15 |
if (ref $value) { } |
232
|
73 |
0 |
defined $ynode ? : |
238
|
15 |
0 |
defined $ynode ? : |
251
|
1380 |
5 |
if ($self->use_aliases) |
253
|
20 |
1360 |
if ($$self{'id_refcnt'}{$node_id} > 1) |
254
|
11 |
9 |
if (defined $$self{'id_anchor'}{$node_id}) |
264
|
2 |
1372 |
if ref $value and not $type |
266
|
13 |
1359 |
if $type eq 'SCALAR' and $tag |
268
|
885 |
474 |
if $type eq 'SCALAR' |
270
|
417 |
57 |
if $type eq 'HASH' |
272
|
57 |
0 |
if $type eq 'ARRAY' |
282
|
57 |
360 |
if $tag |
286
|
0 |
417 |
if $@ |
287
|
8 |
409 |
if $empty_hash |
291
|
18 |
391 |
if ($context == 5 and $self->compress_series and not defined $$self{'id_anchor'}{$node_id} || $tag || $empty_hash) { } |
300
|
391 |
0 |
unless $self->headless and not $self->headless(0) |
308
|
408 |
1 |
if ($self->sort_keys == 1) { } |
|
0 |
1 |
elsif ($self->sort_keys == 2) { } |
|
1 |
0 |
elsif (ref $self->sort_keys eq 'ARRAY') { } |
309
|
59 |
349 |
if (ynode($value)) { } |
323
|
3 |
0 |
defined $order{$a} && defined $order{$b} ? : |
333
|
35 |
374 |
if (exists $$value{&VALUE}) |
335
|
35 |
0 |
if ($keys[$i] eq &VALUE) |
356
|
7 |
50 |
if $tag |
358
|
4 |
53 |
if @$value == 0 |
360
|
52 |
1 |
unless $self->headless and not $self->headless(0) |
364
|
5 |
3 |
unless ref $_ |
|
2 |
2 |
if ($self->inline_series and @$value <= $self->inline_series and not scalar grep({/\n/ unless ref $_;} @$value)) |
372
|
2 |
3 |
if $i == $#{$value;} |
394
|
1102 |
18 |
unless $context == 5 |
423
|
1125 |
905 |
$type == 3 ? : |
424
|
1125 |
905 |
$type == 3 ? : |
425
|
1125 |
905 |
$type == 3 ? : |
429
|
3 |
2027 |
unless defined $_[0] |
433
|
36 |
1991 |
if $_[0] eq "\aYAML\aVALUE\a" |
435
|
1 |
1990 |
if $_[0] =~ /$ESCAPE_CHAR/ |
439
|
26 |
1964 |
if ($_[0] =~ /\n/) |
440
|
1 |
25 |
if $self->use_block |
444
|
0 |
25 |
if $self->use_fold |
446
|
6 |
19 |
if length $_[0] <= 30 |
450
|
2 |
17 |
unless $_[0] =~ /\n\s*\S/ |
458
|
1925 |
39 |
if $self->is_valid_plain($_[0]) |
462
|
1 |
38 |
if $_[0] =~ /'/ |
480
|
6 |
1958 |
unless length $_[0] |
482
|
16 |
1942 |
if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/ |
483
|
9 |
1933 |
if $_[0] =~ /[\{\[\]\},]/ |
484
|
2 |
1931 |
if $_[0] =~ /[:\-\?]\s/ |
485
|
1 |
1930 |
if $_[0] =~ /\s#/ |
486
|
0 |
1930 |
if $_[0] =~ /\:(\s|$)/ |
487
|
4 |
1926 |
if $_[0] =~ /[\s\|\>]$/ |
488
|
1 |
1925 |
if $_[0] eq '-' |
497
|
1 |
9 |
length $1 > 1 ? : |
|
10 |
8 |
length $1 ? : |
498
|
0 |
18 |
unless defined $value |
500
|
0 |
18 |
if $value =~ /^\s/ |
507
|
1925 |
3 |
defined $_[0] ? : |
533
|
0 |
18 |
unless length $text |