blib/lib/Acme/PrettyCure.pm

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