Branch Coverage

lib/BarefootJS.pm
Criterion Covered Total %
branch 187 338 55.3


line true false branch
64 1 28 if (@_)
65 1 0 if (not exists $self->{$attr} and exists $ATTR_DEFAULT{$attr})
67 1 0 ref $d eq 'CODE' ? :
80 0 1 unless ($backend)
86 0 0 $config->{'json_encoder'} ? :
102 1 0 if defined $c
137 0 0 if (defined $host and CORE::length $host)
141 0 0 if (defined $mount and CORE::length $mount)
145 0 0 unless ($self->_is_child)
159 0 0 unless defined $k
167 0 0 unless $props and %$props
203 0 0 if $CONTEXT_STACKS{$name} and @{$CONTEXT_STACKS{$name};}
209 0 0 unless $stack and @$stack
242 0 0 $value ? :
259 0 0 if (defined $host and CORE::length $host)
263 0 0 if ($self->_props and %{$self->_props;})
274 0 0 if $self->_script_seen->{$path}
295 0 0 unless $renderer
300 0 0 @args == 1 && ref $args[0] eq 'HASH' ? :
310 0 0 if exists $props{'children'}
361 0 1 if $entry_name eq "__barefoot__"
365 0 1 unless $entry_name =~ m[^ui/([^/]+)/index$]
368 0 1 unless $marked
394 0 0 if defined $data_key
395 0 0 $slot_id ? :
402 0 0 if ($slot_id)
413 0 0 if ($signal_init) { }
0 0 elsif ($manifest_defaults) { }
443 0 0 if (ref $d ne "HASH")
447 0 0 if ($d->{'isRestProps'})
448 0 0 exists $props->{$name} ? :
452 0 0 if (defined $prop_name and exists $props->{$prop_name} and defined $props->{$prop_name}) { }
529 2 1 defined $value ? :
540 1 14 unless defined $value
541 10 4 if &looks_like_number($value)
555 1 2 if _is_nan($n)
561 1 2 if _is_nan($n)
567 1 4 if _is_nan($n)
593 6 7 if (ref $recv eq "ARRAY")
595 1 9 unless (defined $item)
596 1 0 unless defined $elem
599 2 7 if defined $elem and $item eq $elem
603 2 5 if ref $recv
604 2 3 index($recv // '', $elem // '') != -1 ? :
614 0 0 unless ref $recv eq "ARRAY"
619 0 0 unless ref $recv eq "ARRAY"
620 0 0 unless &$pred($item)
625 0 0 unless ref $recv eq "ARRAY"
626 0 0 if &$pred($item)
636 0 0 unless ref $recv eq "ARRAY"
637 0 0 if &$pred($item)
642 0 0 unless ref $recv eq "ARRAY"
643 0 0 if &$pred($recv->[$i])
648 0 0 unless ref $recv eq "ARRAY"
649 0 0 if &$pred($recv->[$i])
654 0 0 unless ref $recv eq "ARRAY"
655 0 0 if &$pred($recv->[$i])
663 0 0 defined $s ? :
664 0 0 defined $s ? :
671 0 0 unless ref $recv eq "ARRAY"
673 0 0 defined $_ ? :
680 0 0 if ref $recv eq "ARRAY"
681 0 0 if ref $recv
694 1 11 unless ref $recv eq "ARRAY"
695 5 6 $reverse ? :
698 2 25 unless (defined $item)
699 2 0 unless defined $elem
702 5 20 if defined $elem and $item eq $elem
722 3 7 unless ref $recv eq "ARRAY"
723 0 7 unless defined $i
725 1 6 if $len == 0
726 3 3 $i < 0 ? :
727 2 4 if $idx < 0 or $idx >= $len
740 6 3 if ref $a eq "ARRAY"
741 8 1 if ref $b eq "ARRAY"
757 2 11 unless ref $recv eq "ARRAY"
759 1 10 if $len == 0
762 2 8 if $s < 0
763 0 10 if $s < 0
764 1 9 if $s > $len
766 6 4 defined $end ? :
767 2 8 if $e < 0
768 0 10 if $e < 0
769 0 10 if $e > $len
771 3 7 if $s >= $e
784 3 5 unless ref $recv eq "ARRAY"
793 0 0 unless ref $recv eq "ARRAY"
796 0 0 if ($depth != 0 and ref $el eq 'ARRAY') { }
797 0 0 $depth > 0 ? :
813 0 0 unless ref $recv eq "ARRAY"
816 0 0 if ($key_kind eq 'field') { }
820 0 0 ref $el eq 'HASH' ? :
837 0 0 unless ref $recv eq "ARRAY"
842 0 0 if ($kind eq 'field') { }
843 0 0 ref $el eq 'HASH' ? :
864 1 10 unless defined $recv
865 2 8 if ref $recv
884 0 0 if _is_nan($n)
885 0 0 $n < 0 ? :
0 0 if _is_inf($n)
886 0 0 if not defined $digits or $digits < 0
911 16 1 defined $recv && !ref($recv) ? :
914 1 16 if (not defined $sep) { }
2 14 elsif ("$sep" eq '') { }
1 13 elsif ($s eq '') { }
942 4 13 if (defined $limit)
944 1 3 if ($n == 0) { }
1 3 elsif ($n > 0 and $n < scalar @parts) { }
959 10 2 defined $recv && !ref($recv) ? :
960 12 0 defined $prefix ? :
961 4 8 if (defined $position)
963 1 3 if $n < 0
964 1 3 if $n > CORE::length $s
967 7 5 substr($s, 0, CORE::length $p) eq $p ? :
979 10 0 defined $recv && !ref($recv) ? :
980 10 0 defined $suffix ? :
981 4 6 if (defined $end_position)
983 1 3 if $e < 0
984 1 3 if $e > CORE::length $s
987 1 9 if $x eq ""
988 2 7 if CORE::length $s < CORE::length $x
989 4 3 substr($s, -CORE::length($x)) eq $x ? :
1004 8 1 defined $recv && !ref($recv) ? :
1005 9 0 defined $pattern ? :
1006 9 0 defined $replacement ? :
1007 1 8 if $o eq ""
1009 2 6 if $i < 0
1021 6 1 defined $recv && !ref($recv) ? :
1022 7 0 defined $count ? :
1023 2 5 $n <= 0 ? :
1036 2 8 unless defined $pad
1038 1 9 if $pad eq ""
1041 1 8 if $len >= $t
1045 5 3 $at_start ? :
1049 6 1 defined $recv && !ref($recv) ? :
1054 3 0 defined $recv && !ref($recv) ? :
1093 3 13 unless ref $recv eq "ARRAY"
1104 0 13 unless @spec
1112 24 18 $_->{'key_kind'} eq 'field' && ref $item eq 'HASH' ? :
1121 7 32 if $c == 0
1122 9 23 $sp->{'direction'} eq 'desc' ? :
1136 10 29 if ($compare_type eq "string")
1139 9 20 if ($compare_type eq "auto")
1140 6 3 if (&looks_like_number(scalar($av // "")) and &looks_like_number(scalar($bv // "")))
1176 0 0 ref $recv eq 'ARRAY' ? :
1182 0 0 if $direction eq "right"
1184 0 0 $key_kind eq 'field' && ref $item eq 'HASH' ? :
1187 0 0 if ($type eq "string")
1199 0 0 unless defined $n and &looks_like_number($n)
1200 0 0 $op eq '*' ? :
1257 1 22 if $key eq "className"
1258 1 21 if $key eq "htmlFor"
1259 2 19 if $SVG_CAMEL_CASE_ATTRS{$key}
1284 24 0 defined $value ? :
1294 0 2 unless defined $value
1297 1 1 if (ref $value ne "HASH")
1299 1 0 CORE::length $s ? :
1304 0 2 unless defined $v
1309 1 0 @parts ? :
1313 2 23 unless defined $bag and ref $bag eq "HASH"
1319 4 27 if (CORE::length $key > 2 and substr($key, 0, 2) eq "on")
1321 3 1 if CORE::uc $c eq $c
1323 1 27 if $key eq "children"
1326 1 26 unless defined $val
1336 2 24 if (ref $val eq "JSON::PP::Boolean" or ref $val eq "Mojo::JSON::_Bool")
1337 1 1 unless $val
1343 2 22 if ($key eq "style")
1345 0 2 unless defined $css and CORE::length $css
1352 1 22 unless @parts