blib/lib/Games/TF2/Demo/ServerInfo.pm

filter: Statementstmt 55.5% 35 / 63 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 31.5% 6 / 19 Podpod 100% 13 / 13 totaltotal 54.0% 54 / 100 CC 2 SCAR 4.4
CC
2
Cov
53%
os
4.7
protocol
1.3
is_hltv
1.3
CRAP 1.5
« blib/lib/Games/TF2/Demo/Summary.pm ↑ Summary blib/lib/Games/TF2/Demo/GameState/Player.pm »
1 package Games::TF2::Demo::ServerInfo;
2  
3 11 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use feature 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 11 ▶no warnings 'experimental::signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 11 our $VERSION = '0.01';
9  
10 11 ▶use Object::Pad 0.800;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 class Games::TF2::Demo::ServerInfo :strict(params) {
13 11 ▶ use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 0 ▶ field $protocol :param :reader;
Subroutine protocol: not called CC=1 SCAR=2.6
Pod documented
16 0 ▶ field $is_hltv :param :reader;
Subroutine is_hltv: not called CC=1 SCAR=2.6
Pod documented
17 0 ▶ field $is_dedicated :param :reader;
Subroutine is_dedicated: not called CC=1 SCAR=2.6
Pod documented
18 0 ▶ field $max_classes :param :reader;
Subroutine max_classes: not called CC=1 SCAR=2.6
Pod documented
19 0 ▶ field $player_slot :param :reader;
Subroutine player_slot: not called CC=1 SCAR=2.6
Pod documented
20 0 ▶ field $max_clients :param :reader;
Subroutine max_clients: not called CC=1 SCAR=2.6
Pod documented
21 0 ▶ field $tick_interval :param :reader;
Subroutine tick_interval: not called CC=1 SCAR=2.6
Pod documented
22 0 ▶ field $game_dir :param :reader;
Subroutine game_dir: not called CC=1 SCAR=2.6
Pod documented
23 0 ▶ field $map_name :param :reader;
Subroutine map_name: not called CC=1 SCAR=2.6
Pod documented
24 0 ▶ field $sky_name :param :reader;
Subroutine sky_name: not called CC=1 SCAR=2.6
Pod documented
25 0 ▶ field $host_name :param :reader;
Subroutine host_name: not called CC=1 SCAR=2.6
Pod documented
26 0 ▶ field $is_replay :param :reader;
Subroutine is_replay: not called CC=1 SCAR=2.6
Pod documented
27  
28 # The operating system letters of the server info.
29 11 Readonly my %OS_NAMES => ( l => 'linux', w => 'windows', m => 'macos' );
30  
31 11 field $os :param;
32  
33 0 ▶ method os () { return $OS_NAMES{$os} // $os }
Subroutine os: not called CC=2 SCAR=15.4
Pod documented
Condition0%0/3
$OS_NAMES{$os} // $os
l!l&&r!l&&!r
000
MC/DC0%0/2
$OS_NAMES{$os} // $os
$OS_NAMES{$os} $os
Truth table0%0/3
A // B
A= $OS_NAMES{$os}B= $os
ABresult
1X1
011
000
34 }
35  
36 11 1;
37  
38 __END__
« blib/lib/Games/TF2/Demo/Summary.pm ↑ Summary blib/lib/Games/TF2/Demo/GameState/Player.pm »