Branch Coverage

blib/lib/Perlito6/Perl5/Emitter.pm
Criterion Covered Total %
branch 120 202 59.4


line true false branch
46 39 428 if ($s eq '')
51 2894 33 if ($c ge 'a' and $c le 'z' or $c ge 'A' and $c le 'Z' or $c ge '0' and $c le '9' or exists $Hash_safe_char->{$c}) { }
55 21 12 if ($tmp ne '')
64 426 2 if ($tmp ne '')
83 67 0 defined $self->{'body'} ? :
84 414 0 if (defined $_)
172 0 0 defined $self->{'stmts'} ? :
258 0 655 if ($self->{'namespace'}) { }
262 0 144 if ($self->{'sigil'} eq '@' and $self->{'twigil'} eq '*' and $self->{'name'} eq 'ARGS')
265 3 652 if ($self->{'twigil'} eq '.')
266 0 3 if ($self->{'sigil'} eq '%') { }
270 0 3 if ($self->{'sigil'} eq '@') { }
278 0 652 if ($self->{'name'} eq '/')
286 0 131 if ($self->{'namespace'})
335 0 125 if ($invocant eq 'self')
338 7 118 if (exists $$Hash_method_perl5{$self->{'method'}})
339 0 7 if ($self->{'hyper'}) { }
340 0 0 defined $self->{'arguments'} ? :
343 0 7 defined $self->{'arguments'} ? :
346 30 88 if ($self->{'method'} eq 'push')
347 30 0 defined $self->{'arguments'} ? :
349 1 87 if ($self->{'method'} eq 'unshift')
350 1 0 defined $self->{'arguments'} ? :
352 0 87 if ($self->{'method'} eq 'pop')
355 0 87 if ($self->{'method'} eq 'shift')
358 1 86 if ($self->{'method'} eq 'elems')
362 7 79 if ($meth eq 'postcircumfix:<( )>')
365 39 47 defined $self->{'arguments'} ? :
366 1 85 if ($self->{'hyper'}) { }
367 1 0 unless (Main::isa($self->{'invocant'}, 'Apply') and $self->{'invocant'}->code eq 'prefix:<@>')
434 0 1012 if ($apply)
438 6 1006 if ($self->{'namespace'})
442 1012 0 if (Main::isa($code, 'Str')) { }
446 0 0 defined $self->{'arguments'} ? :
448 326 686 if (exists $Hash_op_infix_perl5->{$code})
449 326 0 defined $self->{'arguments'} ? :
451 288 398 if (exists $Hash_op_prefix_perl5->{$code})
452 288 0 defined $self->{'arguments'} ? :
454 0 398 if ($code eq 'self')
457 1 397 if ($code eq 'Mu')
460 0 397 if ($code eq 'make')
461 0 0 defined $self->{'arguments'} ? :
463 0 397 if ($code eq 'array')
464 0 0 defined $self->{'arguments'} ? :
466 0 397 if ($code eq 'pop')
467 0 0 defined $self->{'arguments'} ? :
469 0 397 if ($code eq 'push')
470 0 0 defined $self->{'arguments'} ? :
0 0 defined $self->{'arguments'} ? :
472 2 395 if ($code eq 'shift')
473 2 0 defined $self->{'arguments'} ? :
475 0 395 if ($code eq 'unshift')
476 0 0 defined $self->{'arguments'} ? :
478 5 390 if ($code eq 'prefix:<$>')
479 5 0 defined $self->{'arguments'} ? :
481 7 383 if ($code eq 'prefix:<@>')
482 7 0 defined $self->{'arguments'} ? :
484 0 383 if ($code eq 'prefix:<%>')
485 0 0 defined $self->{'arguments'} ? :
487 0 383 if ($code eq 'postfix:<++>')
488 0 0 defined $self->{'arguments'} ? :
490 0 383 if ($code eq 'postfix:<-->')
491 0 0 defined $self->{'arguments'} ? :
493 1 382 if ($code eq 'infix:<..>')
494 1 0 defined $self->{'arguments'} ? :
496 0 382 if ($code eq 'infix:<===>')
497 0 0 defined $self->{'arguments'} ? :
0 0 defined $self->{'arguments'} ? :
499 36 346 if ($code eq 'ternary:')
500 36 0 defined $self->{'arguments'} ? :
36 0 defined $self->{'arguments'} ? :
36 0 defined $self->{'arguments'} ? :
502 131 215 if ($code eq 'circumfix:<( )>')
503 131 0 defined $self->{'arguments'} ? :
505 176 39 if ($code eq 'infix:<=>')
506 176 0 defined $self->{'arguments'} ? :
176 0 defined $self->{'arguments'} ? :
508 3 36 if ($code eq 'return')
509 3 0 defined $self->{'arguments'} ? :
3 0 defined $self->{'arguments'} ? :
3 0 if (defined $self->{'arguments'} ? $self->{'arguments'} : ($self->{'arguments'} ||= bless([], 'ARRAY')) and scalar @{defined $self->{'arguments'} ? $self->{'arguments'} : ($self->{'arguments'} ||= bless([], 'ARRAY'));} == 1)
510 3 0 defined $self->{'arguments'} ? :
512 0 0 defined $self->{'arguments'} ? :
514 36 0 defined $self->{'arguments'} ? :
519 27 149 if (Main::isa($parameters, 'Call'))
523 11 138 if (Main::isa($parameters, 'Var') and $parameters->sigil eq '@' or Main::isa($parameters, 'Decl') and $parameters->var->sigil eq '@') { }
532 2 136 if (Main::isa($parameters, 'Var') and $parameters->sigil eq '%' or Main::isa($parameters, 'Decl') and $parameters->var->sigil eq '%')
556 96 0 $self->{'body'} ? :
19 77 $self->{'otherwise'} && scalar @{$self->{'otherwise'}->stmts;} ? :
572 2 5 if (Main::isa($cond, 'Var') and $cond->sigil eq '@')
580 0 7 $self->{'init'} ? :
7 0 $cond ? :
0 7 $self->{'continue'} ? :
596 3 5 unless (Main::isa($cond, 'Var') and $cond->sigil eq '@')
605 6 2 if ($self->{'body'}->sig)
625 2 129 if ($decl eq 'has')
629 9 120 if ($self->{'var'}->sigil eq '%') { }
633 53 67 if ($self->{'var'}->sigil eq '@') { }
664 12 0 defined $self->{'block'} ? :
687 12 0 defined $self->{'block'} ? :
718 0 1 if ($self->{'mod'} eq 'v6')