Branch Coverage

blib/lib/Mojo/TFTPd/Connection.pm
Criterion Covered Total %
branch 31 40 77.5


line true false branch
19 0 3 $ENV{'MOJO_TFTPD_DEBUG'} ? :
139 0 6 unless (seek $FH, ($n - 1) * $self->blocksize, 0)
142 0 6 unless (defined read($FH, $data, $self->blocksize))
145 2 4 if (length $data < $self->blocksize)
157 1 5 unless length $data
158 5 0 if $sent
175 0 6 if $n == 0 and $self->lastop eq 6
176 1 5 if $self->lastop eq 5
177 1 4 if $$self{'_last_sequence_number'} and $n == $$self{'_last_sequence_number'}
178 2 2 if $n == $$self{'_sequence_number'}
196 0 5 unless ($n == $self->_sequence_number)
200 0 5 unless (print $FH $data)
203 1 4 unless (length $data == $self->blocksize)
207 1 4 if $self->filesize and $self->filesize < $self->blocksize * ($n - 1) + length($data)
235 1 4 if defined $$self{'_last_sequence_number'}
236 4 0 if $sent
284 2 3 if $self->rfc->{'blksize'}
285 1 4 if $self->rfc->{'timeout'}
286 3 2 if exists $self->rfc->{'tsize'} and $self->filesize
296 5 0 if $sent