VAST/statement.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 64 CC 6 SCAR 30.2
CC
6
Cov
0%
emit_m0ld
42.0
BEGIN
2.0
BEGIN
2.0
CRAP 20.5
1 #XXX MooseX::Declare
2 package VAST::statement;
3 BEGIN {
4 $VAST::statement::VERSION = '0.05';
5 }
6 use utf8;
7 use strict;
8 use warnings;
9 use v5.10;
10 use Mildew::AST::Helpers;
11 use Scalar::Util qw(blessed);
12  
13 sub emit_m0ld {
14 my $m = shift;
15 if ($m->{label}) {
16 Mildew::AST::Label->new(label=>label($m->{label}),stmt=>statement($m->{statement}));
17 } elsif ($m->{statement_control}) {
18 $m->{statement_control}->emit_m0ld;
19 } elsif ($m->{EXPR} && $m->{EXPR}{circumfix} && $m->{EXPR}{circumfix}->isa('VAST::circumfix__S_Cur_Ly')) {
20 my $text = $m->{EXPR}{circumfix}{pblock}{blockoid}{TEXT};
21 if (defined $text && $text eq '{YOU_ARE_HERE}') {
22 Mildew::AST::Assign->new(lvalue=>reg '$YOU_ARE_HERE',rvalue=>call clone=>reg '$scope');
23 } else {
24 call 'postcircumfix:( )' => $m->{EXPR}->emit_m0ld,[capturize];
25 }
26 } elsif ($m->{EXPR}) {
27 $m->{EXPR}->emit_m0ld;
28 } else {
29 ();
30 }
31 }
32  
33  
34 1;