VAST/statement_control__S_if.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 45 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use v5.10;
2 use MooseX::Declare;
3 class VAST::statement_control__S_if {
4 use Mildew::AST::Helpers;
5 method emit_m0ld {
6 my $then = call 'postcircumfix:( )' => code($self->{xblock}{pblock}{blockoid}),[capturize];
7 my $else = lookupf("False");
8 if (ref $self->{else} eq 'ARRAY' &&
9 blessed $self->{else}[0] &&
10 ref $self->{else}[0] &&
11 ref $self->{else}[0]{blockoid}) {
12  
13 $else = call 'postcircumfix:( )' => code($self->{else}[0]{blockoid}),[capturize];
14 }
15  
16 my @elsif;
17 if (ref $self->{elsif} eq 'ARRAY') {
18 foreach my $elsif_part (@{$self->{elsif}}) {
19  
20 my $elsif = call 'postcircumfix:( )' => code($elsif_part->{pblock}{blockoid}),[capturize];
21  
22 push @elsif, Mildew::AST::If->new
23 ( cond => $elsif_part->{EXPR}->emit_m0ld,
24 then => $elsif );
25 }
26 }
27  
28 Mildew::AST::If->new
29 ( cond => $self->{xblock}{EXPR}->emit_m0ld,
30 then => $then,
31 else => $else,
32 elsif => \@elsif );
33 }
34 }