File-Scan-ClamAV
view release on metacpan or search on metacpan
lib/File/Scan/ClamAV.pm view on Meta::CPAN
my $class = shift;
my (%options) = @_;
$options{port} ||= '/tmp/clamd';
$options{find_all} ||= 0;
$options{host} ||= 'localhost';
return bless \%options, $class;
}
=head2 ping()
Pings the clamd to check it is alive. Returns true if it is alive, false if it is dead. Note that it is still possible for a race condition to occur between your test for ping() and any call to scan(). See below for more details.
On error nothing is returned and the errstr() error handler is set.
=cut
sub ping {
my ($self) = @_;
my $conn = $self->_get_connection || return;
$self->_send($conn, "PING\n");
( run in 1.460 second using v1.01-cache-2.11-cpan-14f38c9f855 )