lib/BalanceOfPower/Commands/Role/TreatiesUnderLimit.pm

filter: Statementstmt 52.6% 10 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 50.0% 13 / 26 CC 3 SCAR 18.7
CC
3
Cov
48%
nations_under_treaty_limit
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« lib/BalanceOfPower/Executive.pm ↑ Summary lib/BalanceOfPower/Player.pm »
1 package BalanceOfPower::Commands::Role::TreatiesUnderLimit;
2 11 $BalanceOfPower::Commands::Role::TreatiesUnderLimit::VERSION = '0.300010';
3 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub nations_under_treaty_limit
8 {
9 0 ▶ my $self = shift;
Subroutine nations_under_treaty_limit: not called CC=3 SCAR=24.8
Pod undocumented
10 0 my @targets = @_;
11 0 my @out = ();
12 0 for(@targets)
13 {
14 0 my $nation_name = $_;
15 0 my $n = $self->world->get_nation($nation_name);
16 0 ▶ if($self->world->get_treaties_for_nation($n->name) < $n->treaty_limit)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->world->get_treaties_for_nation($n->name) < $n->treaty_limit) 0 0 0
17 {
18 0 push @out, $nation_name;
19 }
20 }
21 0 return @out;
22 }
23  
24 11 1;
« lib/BalanceOfPower/Executive.pm ↑ Summary lib/BalanceOfPower/Player.pm »