Want5000trillion.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond 60.0% 3 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 82.5% 33 / 40 CC 4 SCAR 6.6
CC
4
Cov
90%
say
3.0
new
2.1
BEGIN
1.0
CRAP 1.9
↑ Summary Want5000trillion/Asciiart.pm »
1 package Acme::Want5000trillion;
2 2 ▶use feature ':5.10';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = "0.03";
7 2 ▶use Acme::Want5000trillion::Asciiart;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 my $languages = {
10 "ja" => "5000兆円欲しい!",
11 "en" => "I want 5000 trillion yen!",
12 "th" => "ฉันต้องการ 5000000000000000 เยน!",
13 "cn" => "我想五千万亿日元!",
14 "it" => "Voglio 5000 trilioni di yen!",
15 "aa" => Acme::Want5000trillion::Asciiart::sayAA(),
16 };
17  
18  
19 6 ▶sub say{
Subroutine say: called CC=3 SCAR=11.0
Pod undocumented
20 6 my ($self,$lang) = @_;
21 6 ▶ $lang //= "ja";
Condition100%2/2
$lang //= "ja"
l!l
51
MC/DC100%1/1
$lang //= "ja"
$lang
Truth table100%2/2
A
A= $lang
Aresult
11
00
22 6 ▶ $lang = "ja" if (! exists($languages->{$lang}));
Branch: 1 branch
BranchTrueFalseTotal
unless exists $languages->{$lang} 0 6 6
23 6 return "$languages->{$lang}";
24 }
25  
26  
27 6 ▶sub new {
Subroutine new: called CC=2 SCAR=7.6
Pod undocumented
28 6 my ($class,%parameters) = @_;
29  
30 6 ▶ my $self = bless ({},ref($class) || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
060
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
31  
32 6 return $self;
33 }
34  
35  
36 2 1;
37 __END__
↑ Summary Want5000trillion/Asciiart.pm »