Branch Coverage

blib/lib/JE/Object/Function.pm
Criterion Covered Total %
branch 90 108 83.3


line true false branch
17 1 10 $ret->typeof eq 'undefined' ? :
221 3733 58 if (ref $scope eq 'HASH') { }
229 23 35 @_ == 1 ? :
238 4 31 if $@
245 0 0 defined $scope ? :
0 3787 unless defined blessed($scope)
254 3435 352 if ref $scope ne 'JE::Scope'
265 1363 2424 unless $opts{'no_proto'}
277 3737 50 ref($opts{'function'}) =~ /^(?:JE::Code|CODE)\z/ ? :
298 2065 1716 ref $opts{'argnames'} eq 'ARRAY' ? :
302 3380 401 ref $opts{'function_args'} eq 'ARRAY' ? :
306 192 3589 if (exists $opts{'constructor'})
310 192 0 ref $opts{'constructor_args'} eq 'ARRAY' ? :
314 3555 226 if (exists $opts{'name'})
335 1 1 $ret->typeof eq 'undefined' ? :
373 1012 103 if (exists $$guts{'constructor'} and ref $$guts{'constructor'} eq 'CODE') { }
378 0 0 $_ eq '[args]' ? :
1012 0 $_ eq 'args' ? :
39 1012 $_ eq 'global' ? :
951 1051 $_ eq 'scope' ? :
0 2002 $_ eq 'self' ? :
401 83 20 unless defined(my $proto = $self->prop('prototype'))
407 14 6 !$proto->primitive ? :
415 3 17 $return->can('primitive') && !$return->primitive ? :
442 23 24049 if (not blessed $obj or ref $obj eq 'JE::Object::Function::Call' or ref($obj) =~ /^JE::(?:Null|Undefined)\z/)
447 22168 1906 if (ref $$guts{'function'} eq 'CODE') { }
1896 10 elsif ($$guts{'function'}) { }
450 0 0 $_ eq '[args]' ? :
19047 0 $_ eq 'args' ? :
4471 19047 $_ eq 'this' ? :
29 23518 $_ eq 'global' ? :
3530 23547 $_ eq 'scope' ? :
0 27077 $_ eq 'self' ? :
489 4 1892 unless defined $ret
494 0 10 unless (defined $global)
576 1 37 unless $self->isa('JE::Object::Function')
593 24 13 exists $$guts{'func_name'} ? :
27 10 ref $$guts{'function'} eq 'JE::Code' ? :
606 0 27 $code =~ /[\cm\cj\x{2028}\x{2029}]\z/ ? :
634 4 4 if (defined $args and not ref($args) =~ /^JE::(Null|Undefined| Object::Function::Arguments)\z/x and eval { do { $args->class } } ne 'Array')
649 4 170 if defined $args
650 2 172 defined $args ? :
720 8057 94 defined $arg_val ? :
747 6376 1 unless (exists $self{'arguments'})
757 272 9135 if (ref $name eq 'HASH')
760 0 272 exists $$opts{'value'} ? :
761 272 0 if exists $$opts{'dontdel'}
765 901 8506 if (@_)
769 8177 329 if (exists $$self{$name})
778 39 53 unless ($_[2])
779 4 35 if exists $$self{-'dontdel'}{$varname} and $$self{-'dontdel'}{$varname}
837 2 8055 if ($seen{$name}++) { }
867 13 14231 if (exists $$guts{'args_magic'} and exists $$guts{'args_magic'}{$name})
880 0 0 if (exists $$guts{'args_magic'} and exists $$guts{'args_magic'}{$name})