Branch Coverage

blib/lib/File/VirusScan/Engine/Daemon/ClamAV/Clamd.pm
Criterion Covered Total %
branch 1 44 2.2


line true false branch
21 8 0 unless ($$conf{'socket_name'})
25 0 0 if (exists $$conf{'zip_fallback'})
26 0 0 unless (blessed($$conf{'zip_fallback'}) and $$conf{'zip_fallback'}->isa('File::VirusScan::Engine::Daemon'))
47 0 0 unless (defined $sock)
58 0 0 if (abs_path($path) ne $path)
63 0 0 if ($@)
69 0 0 unless ($s->can_write($$self{'ping_timeout'}))
74 0 0 unless ($sock->print("nIDSESSION\nnPING\n"))
79 0 0 unless ($sock->flush)
84 0 0 unless ($s->can_read($$self{'ping_timeout'}))
90 0 0 unless ($sock->sysread($ping_response, 256))
95 0 0 if (not defined $ping_response or $ping_response ne "1: PONG\n")
100 0 0 unless ($s->can_write($$self{'write_timeout'}))
105 0 0 unless ($sock->print("nSCAN $path\n"))
110 0 0 unless ($sock->flush)
115 0 0 unless ($s->can_read($$self{'read_timeout'}))
125 0 0 unless ($sock->sysread($scan_response, 256))
133 0 0 unless ($rc)
138 0 0 unless ($id)
143 0 0 if ($status =~ /(.+) FOUND/) { }
0 0 elsif ($scan_response =~ /(.+) ERROR/) { }
154 0 0 if ($$self{'zip_fallback'} and $err_detail =~ /(?:zip module failure|not supported data format)/i)