Branch Coverage

blib/lib/Minecraft/RCON.pm
Criterion Covered Total %
branch 68 78 87.1


line true false branch
68 21 8 'HASH' eq ref $_[0] ? :
72 1 28 if ($opts{'convert_color'})
76 1 28 if ($opts{'strip_color'})
82 1 28 if @unknowns
90 0 18 if $s->connected
92 1 17 unless length $s->{'password'}
97 1 16 unless $s->{'socket'} = 'IO::Socket::INET'->new('PeerAddr', $s->{'address'}, 'PeerPort', $s->{'port'}, 'Proto', 'tcp')
105 3 13 unless $type == 2 and $id == $res_id
107 1 15 if $res_id == -1
108 1 14 if $type != 2
109 1 13 if $id != $res_id
110 1 12 if length $payload
115 60 51 if $_[0]{'socket'}
118 16 30 if $_[0]->connected
119 17 29 if exists $_[0]{'socket'}
126 1 9 unless length $command
127 1 8 unless $s->connected
137 0 19 if ($id != $res_id)
144 0 19 if $type != 0
146 8 11 if $payload eq sprintf('Unknown request %x', $nonce)
150 0 8 defined $mode ? :
155 11 49 unless defined $mode
156 2 47 unless $mode =~ /^(strip|convert|ignore)$/
159 1 46 if ($code) { }
171 19 44 unless defined $mode
174 38 25 if $mode eq 'strip'
175 12 51 if $mode eq 'convert'
176 10 53 if $mode eq 'convert' and $text =~ /\e\[/
190 1 1 if $val
198 1 1 if $val
205 1 1 if defined $_[1]
211 1 1 if defined $_[1]
217 1 1 if defined $_[1]
231 0 32 unless $id =~ /^\d+$/
232 0 32 unless defined $payload
241 0 35 unless $s->connected
248 0 35 unless $size
257 0 35 if 10 > length $_
258 0 35 unless s/\0\0$//