VAST/sublongname.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 35 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use MooseX::Declare;
2 class VAST::sublongname {
3 use utf8;
4 use Mildew::AST::Helpers;
5 method components {
6 my $shortname = $self->{subshortname};
7 if ($shortname->{desigilname}) {
8 $shortname->{desigilname}{longname}->components;
9 } elsif ($shortname->{category}) {
10 my $single_variant = '';
11 if ($shortname->{colonpair}[1]) {
12 if ($shortname->{colonpair}[1]{fakesignature}) {
13 # TODO handle whitespace sensibly
14 $single_variant = ':(' . $shortname->{colonpair}[1]{fakesignature}->Str . ')';
15 } else {
16 XXX;
17 }
18 }
19 # TODO find the source of the warning
20 my $ret =
21 $self->{sigil}{TEXT}
22 . ($self->{twigil}[0]{TEXT} // '')
23 . $shortname->{category}{TEXT}
24 . ':'
25 . $shortname->{colonpair}[0]{v}{circumfix}{nibble}->Str
26 . $single_variant;
27 return $ret;
28 }
29 }
30 }
31 1;