VAST/multi_declarator__S_multi.pm untested

filter: Statementstmt 0.0% 0 / 35 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 54 CC 6 SCAR 30.9
CC
6
Cov
0%
emit_m0ld
42.0
BEGIN
2.0
BEGIN
2.0
CRAP 22.0
1 package VAST::multi_declarator__S_multi;
2 BEGIN {
3 $VAST::multi_declarator__S_multi::VERSION = '0.05';
4 }
5 use utf8;
6 use strict;
7 use warnings;
8 use Mildew::AST::Helpers;
9 use v5.10;
10  
11 sub emit_m0ld {
12 my ($m) = @_;
13 my $routine = $m->{routine_def};
14 my $name;
15 if ($routine->{deflongname}[0]) {
16 $name = '&'.$routine->{deflongname}[0]{name}{identifier}{TEXT};
17 if (my $colonpair = $routine->{deflongname}[0]{colonpair}[0]) {
18 if ($colonpair->{coloncircumfix}{circumfix}->isa('VAST::circumfix__S_Lt_Gt')) {
19 $name .= ':'.$colonpair->{coloncircumfix}{circumfix}->{nibble}->Str;
20 } else {
21 XXX;
22 }
23 }
24 }
25  
26 my $sig = $routine->{multisig}[0]{signature}[0];
27 my $rout = routine($routine->{blockoid},($sig ? $sig->emit_m0ld : empty_sig));
28 my $ret = Mildew::AST::Seq->new(stmts=>[
29 $Mildew::multis->{$name} ? () : call(BIND => curlies($name),[call new => lookupf('Multi')]),
30 call(get_outer_candidates => lookupf($name),[string $name,reg '$scope']),
31 call(push => FETCH(call candidates => lookupf($name)),[$rout]),
32 ]);
33 $Mildew::multis->{$name} = 1;
34 return $ret;
35 }
36  
37 1;