Games/AssaultCube/Log/Line/Says.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/MasterserverReply.pm ↑ Summary Games/AssaultCube/Log/Line/TeamStatus.pm »
1 # Declare our package
2 package Games::AssaultCube::Log::Line::Says;
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::NickIP';
14  
15 # TODO improve validation for everything here, ha!
16  
17 2 has 'text' => (
18 isa => 'Str',
19 is => 'ro',
20 required => 1,
21 );
22  
23 2 has 'isteam' => (
24 isa => 'Bool',
25 is => 'ro',
26 default => 0,
27 );
28  
29 2 has 'spam' => (
30 isa => 'Bool',
31 is => 'ro',
32 default => 0,
33 );
34  
35 has 'tostr' => (
36 isa => 'Str',
37 is => 'ro',
38 lazy => 1,
39 0 ▶ default => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
40 0 my $self = shift;
41 0 ▶ return $self->nick . " said" . ( $self->isteam ? " to team: " : ": " ) . $self->text;
Branch: 1 branch
BranchTrueFalseTotal
$self->isteam ? : 0 0 0
42 },
43 2 );
44  
45 2 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
46 2 __PACKAGE__->meta->make_immutable;
47  
48 2 1;
49 __END__
« Games/AssaultCube/Log/Line/MasterserverReply.pm ↑ Summary Games/AssaultCube/Log/Line/TeamStatus.pm »