Games/AssaultCube/Log/Line/TeamStatus.pm

filter: Statementstmt 90.0% 18 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 80.7% 21 / 26 CC 2 SCAR 11.0
CC
2
Cov
82%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Games/AssaultCube/Log/Line/Says.pm ↑ Summary Games/AssaultCube/Log/Line/CallVote.pm »
1 # Declare our package
2 package Games::AssaultCube::Log::Line::TeamStatus;
3  
4 # import the Moose stuff
5 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # Initialize our version
8 2 ▶use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 $VERSION = '0.04';
10  
11 2 extends 'Games::AssaultCube::Log::Line::Base';
12  
13 2 with 'Games::AssaultCube::Log::Line::Base::TeamInfo';
14  
15 # TODO improve validation for everything here, ha!
16  
17 2 has 'players' => (
18 isa => 'Int',
19 is => 'ro',
20 required => 1,
21 );
22  
23 2 has 'frags' => (
24 isa => 'Int',
25 is => 'ro',
26 required => 1,
27 );
28  
29 2 has 'flags' => (
30 isa => 'Int',
31 is => 'ro',
32 );
33  
34 has 'tostr' => (
35 isa => 'Str',
36 is => 'ro',
37 lazy => 1,
38 0 ▶ default => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
39 0 my $self = shift;
40 0 ▶ return "Team Status for " . $self->team_name . ": " . $self->players . " players, " . $self->frags . " frags" . ( defined $self->flags ? ", " . $self->flags . " flags" : "" );
Branch: 1 branch
BranchTrueFalseTotal
defined $self->flags ? : 0 0 0
41 },
42 2 );
43  
44 2 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 2 __PACKAGE__->meta->make_immutable;
46  
47 2 1;
48 __END__
« Games/AssaultCube/Log/Line/Says.pm ↑ Summary Games/AssaultCube/Log/Line/CallVote.pm »