lib/BalanceOfPower/Commands/Role/TreatiesUnderLimit.pm

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 92.3% 24 / 26 CC 3 SCAR 6.9
CC
3
Cov
95%
nations_under_treaty_limit
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« blib/lib/BalanceOfPower/Role/Player.pm ↑ Summary lib/BalanceOfPower/Commands/AidInsurgents.pm »
1 package BalanceOfPower::Commands::Role::TreatiesUnderLimit;
2 13 $BalanceOfPower::Commands::Role::TreatiesUnderLimit::VERSION = '0.400115';
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub nations_under_treaty_limit
8 11 ▶{
Subroutine nations_under_treaty_limit: called CC=3 SCAR=11.0
Pod undocumented
9 11 my $self = shift;
10 11 my @targets = @_;
11 11 my @out = ();
12 11 for(@targets)
13 {
14 34 my $nation_name = $_;
15 34 my $n = $self->world->get_nation($nation_name);
16 34 ▶ 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) 34 0 34
17 {
18 34 push @out, $nation_name;
19 }
20 }
21 11 return @out;
22 }
23  
24 13 1;
« blib/lib/BalanceOfPower/Role/Player.pm ↑ Summary lib/BalanceOfPower/Commands/AidInsurgents.pm »