line |
true |
false |
branch |
56
|
295 |
49 |
unless $desc->{'kind'} eq 'enum' |
73
|
50 |
294 |
if ($kind =~ /^(enum|oneof)$/) { } |
|
57 |
237 |
elsif ($kind eq 'group') { } |
|
237 |
0 |
elsif ($kind eq 'message') { } |
91
|
6 |
652 |
if ($opts->{'simple_extensions'}) { } |
92
|
5 |
1 |
$field_name =~ /\.(\w+)$/ ? : |
98
|
652 |
656 |
if $type_idents[0] ne $field_idents[0] |
102
|
0 |
652 |
unless @field_idents |
116
|
1 |
0 |
$oneof_name =~ /\.(\w+)$/ ? : |
129
|
462 |
1619 |
unless ($type =~ /^\d+$/) |
140
|
371 |
1710 |
if ($default_value and ref $default_value) { } |
|
56 |
1654 |
elsif ($default_value) { } |
142
|
0 |
371 |
unless ref $default_value eq 'HASH' |
159
|
237 |
57 |
if ($kind eq 'message') { } |
|
57 |
0 |
elsif ($kind eq 'group') { } |
171
|
3 |
18 |
if ($opts->{'generate_code'}) |
174
|
3 |
0 |
if (not ref $opts->{'generate_code'}) { } |
175
|
0 |
3 |
unless open $fh, ">$opts->{'generate_code'}" |
181
|
1 |
2 |
$opts->{'package_name'} ? : |
184
|
1 |
2 |
$source->{'file'} ? : |
253
|
0 |
328 |
unless $class_name =~ /^[a-z_]\w*(?:::[a-z_]\w*)*$/i |
261
|
0 |
2307 |
unless $name |
266
|
0 |
2307 |
unless $name and $name =~ /^\[?[a-z_][\w\.]*\]?$/i |
268
|
1 |
2306 |
if ($field_names{$name}++) |
275
|
0 |
2306 |
unless $field_number > 0 |
276
|
0 |
2306 |
if ($field_numbers{$field_number}++) |
283
|
0 |
2306 |
unless $type_name |
284
|
1794 |
512 |
if ($type_name =~ /^\d+$/) { } |
287
|
0 |
512 |
unless $type_name =~ /^[a-z_]\w*(?:::[a-z_]\w*)*$/i |
291
|
0 |
626 |
unless $label == 1 or $label == 2 or $label == 3 |
306
|
1 |
326 |
if ($has_oneofs) |
317
|
1 |
326 |
if ($has_oneofs) |
323
|
158 |
169 |
if ($opts->{'create_accessors'}) |
326
|
1 |
157 |
if ($has_oneofs) |
334
|
0 |
158 |
if ($opts->{'follow_best_practice'}) |
354
|
0 |
54 |
unless $class_name =~ /^[a-z_]\w*(?:::[a-z_]\w*)*$/i |
359
|
0 |
222 |
unless $name and $name =~ /^[a-z_]\w*$/i |
361
|
0 |
222 |
if ($names{$name}++) |
394
|
14 |
0 |
ref $self ? : |
397
|
0 |
14 |
unless ($extension_name) |
405
|
13 |
1 |
if ($field) { } |
406
|
10 |
3 |
exists $data->{$key} ? : |
417
|
5 |
0 |
ref $self ? : |
424
|
4 |
1 |
if ($self->_pb_fields_by_name->{$key}) { } |
439
|
1 |
0 |
unless defined $fields |
445
|
0 |
0 |
if (not defined $value) { } |
464
|
0 |
3 |
unless $self->can('_pb_oneofs') and exists $self->_pb_oneofs->{$oneof} |
467
|
2 |
3 |
if (defined $self->{$f}) |
483
|
56 |
0 |
if (@_ == 1) { } |
|
0 |
0 |
elsif (@_ > 1) { } |
487
|
25 |
31 |
if defined $$self{$_[0]} |
494
|
0 |
0 |
if (defined $self->{$key}) { } |
511
|
17 |
0 |
if (@_ == 1) { } |
|
0 |
0 |
elsif (@_ > 1) { } |
512
|
16 |
1 |
if (defined $_[0]) { } |
524
|
2 |
0 |
if ($self->can('_pb_oneofs_rev') and exists $self->_pb_oneofs_rev->{$key}) |
526
|
2 |
2 |
unless $f eq $key |
536
|
1 |
860 |
if ($opts->{'no_camel_case'}) { } |