PrettyCure.pm

filter: Statementstmt 99.0% 101 / 102 Branchbran 75.0% 3 / 4 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 90.0% 9 / 10 Podpod 83.3% 5 / 6 totaltotal 96.8% 121 / 125 CC 5 SCAR 6.6
CC
5
Cov
98%
_get
3.0
girls
3.0
members
2.0
CRAP 1.9
« PrettyCure/Girl/CureMelody.pm ↑ Summary PrettyCure/Girl/CurePeace.pm »
1 package Acme::PrettyCure;
2 20 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 20 ▶use 5.008005;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 our $VERSION = '1.0.0';
5  
6 20 ▶use UNIVERSAL::require;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 20 my %SERIES = (
9 First => [qw/ CureBlack CureWhite /],
10 MaxHeart => [qw/ CureBlackMH CureWhiteMH ShinyLuminous /],
11 SplashStar => [qw/ CureBloom CureEgret /],
12 Five => [qw/ CureDream CureRouge CureLemonade CureMint CureAqua /],
13 Fresh => [qw/ CurePeach CureBerry CurePine CurePassion /],
14 HeartCatch => [qw/ CureBlossom CureMarine CureSunshine CureMoonlight /],
15 Suite => [qw/ CureMelody CureRhythm CureBeat CureMuse /],
16 Smile => [qw/ CureHappy CureSunny CurePeace CureMarch CureBeauty /],
17 DokiDoki => [qw/ CureHeart CureDiamond CureRosetta CureSword CureAce /],
18 );
19  
20 20 $SERIES{FiveGoGo} = [ @{ $SERIES{Five} }, 'MilkyRose' ];
21  
22 $SERIES{AllStar} = [
23 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
24 20 @{ $SERIES{Fresh} }, @{ $SERIES{HeartCatch} }, @{ $SERIES{Suite} },
25 20 @{ $SERIES{Smile} }, @{ $SERIES{DokiDoki} },
26 ];
27 $SERIES{AllStarDX1} = [
28 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
29 qw/ CurePeach CureBerry CurePine /
30 ];
31 $SERIES{AllStarDX2} = [
32 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
33 20 @{ $SERIES{Fresh} },
34 qw/ CureBlossom CureMarine /
35 ];
36 $SERIES{AllStarDX3} = [
37 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
38 20 @{ $SERIES{Fresh} }, @{ $SERIES{HeartCatch} },
39 qw/ CureMelody CureRhythm /
40 ];
41 $SERIES{AllStarNewStage} = [
42 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
43 20 @{ $SERIES{Fresh} }, @{ $SERIES{HeartCatch} }, @{ $SERIES{Suite} },
44 20 @{ $SERIES{Smile} },
45 qw/ CureEcho /
46 ];
47 $SERIES{AllStarNewStage2} = [
48 20 @{ $SERIES{MaxHeart} }, @{ $SERIES{SplashStar} }, @{ $SERIES{FiveGoGo} },
49 20 @{ $SERIES{Fresh} }, @{ $SERIES{HeartCatch} }, @{ $SERIES{Suite} },
50 20 @{ $SERIES{Smile} },
51 qw/ CureHeart CureDiamond CureRosetta CureSword /,
52 ];
53  
54  
55  
56 1 ▶sub allstar {
Subroutine allstar: called CC=1 SCAR=0.0
Pod undocumented
57 1 my $class = shift;
58  
59 1 my ($nagi, $hono) = $class->_get(qw(CureBlack CureWhite));
60 1 $nagi->transform($hono);
61 1 my ($hikari,) = $class->_get('ShinyLuminous');
62 1 $hikari->transform;
63  
64 1 my ($saki, $mai) = $class->_get(qw(CureBloom CureEgret));
65 1 $saki->transform($mai);
66  
67 1 my @five = $class->_get(@{$SERIES{FiveGoGo}});
68 1 my $nozomi = shift @five;
69 1 my $miruku = pop @five;
70 1 $nozomi->transform(@five);
71 1 $miruku->transform;
72  
73 1 my @fresh = $class->_get(@{$SERIES{Fresh}});
74 1 my $love = shift @fresh;
75 1 $love->transform(@fresh);
76  
77 1 my @hc = $class->_get(@{$SERIES{HeartCatch}});
78 1 my $tsubomi = shift @hc;
79 1 $tsubomi->transform(@hc);
80  
81 1 my @suite = $class->_get(@{$SERIES{Suite}});
82 1 my $hibiki = shift @suite;
83 1 $hibiki->transform(@suite);
84  
85 1 my @smile = $class->_get(@{$SERIES{Smile}});
86 1 my $miyuki = shift @smile;
87 1 $miyuki->transform(@smile);
88  
89 1 my @dokidoki = $class->_get(@{$SERIES{DokiDoki}});
90 1 my $mana = shift @dokidoki;
91 1 $mana->transform(@dokidoki);
92 }
93  
94 24 ▶sub girls {
Subroutine girls: called CC=3 SCAR=11.0
Pod documented
95 24 my ($class, $team) = @_;
96 24 ▶ $team ||= 'First';
Condition100%2/2
$team ||= "First"
l!l
231
MC/DC100%1/1
$team ||= "First"
$team
Truth table100%2/2
A
A= $team
Aresult
11
00
97  
98 24 ▶ my $names = $SERIES{$team} or die "can't find $team at pretty cure";
Branch: 1 branch
BranchTrueFalseTotal
my $names = $SERIES{$team} or die "can't find $team at pretty cure" 23 1 24
99 23 return $class->_get(@$names);
100 }
101  
102 0 ▶sub members { girls(@_) }
Subroutine members: not called CC=1 SCAR=6.9
Pod documented
103  
104 1 ▶sub all_series{ keys %SERIES }
Subroutine all_series: called CC=1 SCAR=0.0
Pod documented
105 1 ▶sub tv_series{ grep { !/^All/ } keys %SERIES }
Subroutine tv_series: called CC=1 SCAR=0.0
Pod documented
106  
107 1 ▶sub now { shift->girls('DokiDoki') }
Subroutine now: called CC=1 SCAR=0.0
Pod documented
108  
109 39 ▶sub _get {
Subroutine _get: called CC=3 SCAR=11.0
110 39 my ($class, @names) = @_;
111  
112 39 my @girls;
113 39 for my $name (@names) {
114 287 my $module = "Acme::PrettyCure::Girl::$name";
115 287 ▶ $module->require or die $@;
Branch: 1 branch
BranchTrueFalseTotal
$module->require or die $@ 287 0 287
116  
117 287 push @girls, $module->new;
118 }
119  
120 39 return @girls;
121 }
122  
123  
124 20 1;
125 __END__
« PrettyCure/Girl/CureMelody.pm ↑ Summary PrettyCure/Girl/CurePeace.pm »