File Coverage

lib/BalanceOfPower/Commands/LowerDisorder.pm
Criterion Covered Total %
statement 10 11 90.9
branch 1 2 50.0
condition 1 3 33.3
subroutine 3 3 100.0
pod 0 1 0.0
total 15 20 75.0


line stmt bran cond sub pod time code
1             package BalanceOfPower::Commands::LowerDisorder;
2             $BalanceOfPower::Commands::LowerDisorder::VERSION = '0.400115';
3 13     13   52 use Moo;
  13         17  
  13         74  
4              
5 13     13   3119 use BalanceOfPower::Constants ":all";
  13         22  
  13         8458  
6              
7             extends 'BalanceOfPower::Commands::NoArgs';
8              
9             sub IA
10             {
11 13     13 0 23 my $self = shift;
12 13         37 my $nation = $self->get_nation();
13 13 50 33     65 if($nation->internal_disorder > WORRYING_LIMIT && $nation->production_for_domestic > DOMESTIC_BUDGET)
14             {
15 0         0 return "LOWER DISORDER";
16             }
17             else
18             {
19 13         29 return undef;
20             }
21             }
22              
23             1;