NAME

File::VirusScan::Engine::Daemon::ClamAV::Clamd - File::VirusScan backend for scanning with clamd

SYNOPSIS

    use File::VirusScan;
    my $s = File::VirusScan->new({
	engines => {
		'-Daemon::ClamAV::Clamd' => {
			socket_name => '/path/to/clamd.ctl',
		},
		...
	},
	...
}

DESCRIPTION

File::VirusScan backend for scanning using ClamAV's clamd daemon.

File::VirusScan::Engine::Daemon::ClamAV::Clamd inherits from, and follows the conventions of, File::VirusScan::Engine::Daemon. See the documentation of that module for more information.

CLASS METHODS

new ( $conf )

Creates a new scanner object. $conf is a hashref containing:

socket_name

Required.

This must be a fully-qualified path to the clamd socket. Currently, only local clamd connections over a UNIX socket are supported.

ping_timeout

Optional. Defaults to 5 seconds.

Timeout in seconds waiting for a clamd 'PING' command to return.

read_timeout

Optional. Defaults to 60 seconds.

Timeout in seconds for waiting on clamd socket reads.

write_timeout

Optional. Defaults to 30 seconds.

Timeout in seconds for waiting for clamd socket to be writeable.

zip_fallback

Optional. Default is undef.

This config option can be a reference to an instance of File::VirusScan::Engine::Daemon object that will be used as a fallback in the event that clamd returns a 'zip module failure' error.

INSTANCE METHODS

scan ( $pathname )

Scan the path provided using clamd on a the configured local UNIX socket.

Returns an File::VirusScan::Result object.

DEPENDENCIES

IO::Socket::UNIX, IO::Select, Scalar::Util, Cwd, File::VirusScan::Result,

SEE ALSO

http://www.clamav.net/

AUTHOR

Dianne Skoll (dianne@skoll.ca)

Dave O'Neill (dmo@roaringpenguin.com)

LICENCE AND COPYRIGHT

Copyright (c) 2007 Roaring Penguin Software, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, or (at your option) any later version.