Branch Coverage

blib/lib/Net/FileShare.pm
Criterion Covered Total %
branch 2 166 1.2


line true false branch
86 0 1 if $$self{'_send_only'} eq 0
89 0 1 unless my($socket) = 'IO::Socket::INET'->new('Listen', 128, 'LocalPort', $port, 'Reuse', 1, 'Proto', 'tcp', 'Timeout', 120)
103 0 0 if $$self{'_send_only'} eq 0
106 0 0 unless my($socket) = 'IO::Socket::INET'->new('Listen', 128, 'LocalPort', $port, 'Reuse', 1, 'Proto', 'tcp', 'Timeout', 120)
119 0 0 unless defined($remote = $socket->accept)
130 0 0 unless (defined $pid)
132 0 0 if $$self{'_debug'} eq 1
138 0 0 if ($pid)
141 0 0 if $$self{'_debug'} eq 1
151 0 0 if (@_ < 4)
165 0 0 if ($cmd =~ /[Gg][Ee][Tt]/ or $cmd =~ /[Ll][Ii][Ss][Tt]|[Ll][Ss]|[Dd][Ii][Rr]/) { }
168 0 0 unless my($socket) = 'IO::Socket::INET'->new('PeerAddr', $server, 'PeerPort', $port, 'Proto', 'tcp', 'Type', 1)
175 0 0 if $$self{'_debug'} eq 1
180 0 0 if ($serv_cmd eq $Net::FileShare::HELO) { }
182 0 0 if $$self{'_debug'} eq 1
185 0 0 if ($cmd =~ /[Gg][Ee][Tt]/) { }
0 0 elsif ($cmd =~ /[Ll][Ii][Ss][Tt]|[Ll][Ss]|[Dd][Ii][Rr]/) { }
188 0 0 if (length $file eq 0) { }
196 0 0 if ($serv_cmd eq $Net::FileShare::ACK_CMD)
203 0 0 if ($localfd) { }
208 0 0 unless (sysopen $loc, "$directory/$file", 65)
217 0 0 if $bytes_read eq $file_size
220 0 0 unless (defined $read and $read eq length $packet)
224 0 0 unless (defined $written and $written eq length $packet)
233 0 0 $! ? :
0 0 unless close $loc
242 0 0 if ($serv_cmd eq $Net::FileShare::ACK_CMD)
273 0 0 unless my($socket) = 'IO::Socket::INET'->new('PeerAddr', $server, 'PeerPort', $port, 'Proto', 'tcp', 'Type', 1)
280 0 0 if $$self{'_debug'} eq 1
285 0 0 if ($serv_cmd eq $Net::FileShare::HELO)
307 0 0 if ($clie_cmd =~ /^[Ll][Ii][Ss][Tt]|^[Ll][Ss]|^[Dd][Ii][Rr]/) { }
0 0 elsif ($clie_cmd =~ /^[Gg][Ee][Tt]/) { }
0 0 elsif ($clie_cmd =~ /[Qq][Uu][Ii][Tt]/) { }
311 0 0 if ($serv_cmd eq $Net::FileShare::ACK_CMD)
329 0 0 if ($clie_cmd =~ /^[Gg][Ee][Tt]\s/ and length $clie_cmd > 4) { }
342 0 0 if ($serv_cmd eq $Net::FileShare::ACK_CMD) { }
349 0 0 if ($localfd) { }
354 0 0 unless (sysopen $loc, "$directory/$local_file", 65)
363 0 0 if $bytes_read eq $file_size
366 0 0 unless (defined $read and $read eq length $packet)
370 0 0 unless (defined $written and $written eq length $packet)
380 0 0 $! ? :
0 0 unless close $loc
408 0 0 if (@_ > 2) { }
425 0 0 if (eval { do { $msg = $self->_recv_packet } })
427 0 0 if (not defined $msg) { }
470 0 0 if $clie_cmd eq $Net::FileShare::QUIT
472 0 0 if ($clie_cmd ne $Net::FileShare::GET and $clie_cmd ne $Net::FileShare::LIST) { }
476 0 0 if ($clie_cmd eq $Net::FileShare::GET) { }
0 0 elsif ($clie_cmd eq $Net::FileShare::LIST) { }
478 0 0 if $$self{'_debug'} eq 1
481 0 0 if $$self{'_debug'} eq 1
482 0 0 if (length $local_file > 0) { }
483 0 0 if $$self{'_debug'} eq 1
486 0 0 if $$self{'_debug'} eq 1
487 0 0 if ($local_file =~ m[^/] or $local_file =~ /^\.\.?$/)
488 0 0 if $$self{'_debug'} eq 1
492 0 0 if $$self{'_debug'} eq 1
496 0 0 if $$self{'_debug'} eq 1
497 0 0 if (-f "$directory/$local_file") { }
498 0 0 if $$self{'_debug'} eq 1
501 0 0 if (-e "$directory/$local_file" and -r "$directory/$local_file") { }
508 0 0 if $$self{'_debug'} eq 1
516 0 0 if ($localfd) { }
520 0 0 unless (sysopen $loc, "$directory/$local_file", 0)
530 0 0 if $bytes_wrote eq $file_size
533 0 0 unless (defined $read and defined $wrote)
539 0 0 if $$self{'_debug'} eq 1
540 0 0 $! ? :
0 0 unless close $loc
548 0 0 if $$self{'_debug'} eq 1
553 0 0 if $$self{'_debug'} eq 1
558 0 0 if $$self{'_debug'} eq 1
565 0 0 if $$self{'_debug'} eq 1
569 0 0 unless opendir DIR, $directory
571 0 0 if ($file =~ /^\./ or -d "$directory/$file") { }
578 0 0 if $$self{'_debug'} eq 1
593 0 0 if $plen > 255
606 0 0 if (not defined $wrote_length) { }
0 0 elsif ($wrote_length != $plen) { }
631 0 0 if (not defined $ret) { }
0 0 elsif (length $slen != 1) { }
642 0 0 if (not defined $ret) { }