Character/Instance/Thor_Odinson.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 80.6% 25 / 31 CC 2 SCAR 3.6
CC
2
Cov
90%
get
2.5
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Character/Instance/Steve_Rogers.pm ↑ Summary Character/Instance/Tony_Stark.pm »
1 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Acme::Marvel::CinematicUniverse::Character::Instance::Thor_Odinson;
6  
7 1 our $AUTHORITY = 'cpan:TOBYINK';
8 1 our $VERSION = '0.004';
9  
10 1 ▶use Acme::Marvel::CinematicUniverse::Character;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 my $instance;
13 1 ▶sub get {
Subroutine get: called CC=2 SCAR=9.2
Pod undocumented
14 1 ▶ $instance ||= 'Acme::Marvel::CinematicUniverse::Character'->new(
Condition33%1/3
$instance ||= "Acme::Marvel::CinematicUniverse::Character"->new("real_name", "Thor Odinson", "hero_name", "Thor", "intelligence", 2, "strength", 7, "speed", 7, "durability", 6, "energy_projection", 6, "fighting_ability", 4)
l!l&&r!l&&!r
010
MC/DC0%0/2
$instance ||= "Acme::Marvel::CinematicUniverse::Character"->new("real_name", "Thor Odinson", "hero_name", "Thor", "intelligence", 2, "strength", 7, "speed", 7, "durability", 6, "energy_projection", 6, "fighting_ability", 4)
$instance "Acme::Marvel::CinematicUniverse::Character"->new("real_name", "Thor Odinson", "hero_name", "Thor", "intelligence", 2, "strength", 7, "speed", 7, "durability", 6, "energy_projection", 6, "fighting_ability", 4)
Truth table33%1/3
A ||= B
A= $instanceB= "Acme::Marvel::CinematicUniverse::Character"->new("real_name", "Thor Odinson", "hero_name", "Thor", "intelligence", 2, "strength", 7, "speed", 7, "durability", 6, "energy_projection", 6, "fighting_ability", 4)
ABresult
1X1
011
000
15 real_name => 'Thor Odinson',
16 hero_name => 'Thor',
17 intelligence => 2,
18 strength => 7,
19 speed => 7,
20 durability => 6,
21 energy_projection => 6,
22 fighting_ability => 4,
23 );
24 }
25  
26 1 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
27 1 my ( $me, $collector ) = ( shift, @_ );
28 1 $collector->load_character( $me->get );
29 }
30  
31 1 1;
« Character/Instance/Steve_Rogers.pm ↑ Summary Character/Instance/Tony_Stark.pm »