A port or socket to connect to if you do not wish to use the unix domain socket at /tmp/clamd. If the socket has been setup as a TCP/IP socket (see the TCPSocket option in the clamav.conf file), then specifying in a number will cause File::Scan::ClamAV to use a TCP socket.
Note: there is no way to connect to a clamd on another machine. The reason for this is that clamd can only scan local files, so there would not be much point in doing this (unless you had NFS shares). Plus if you are using TCP/IP clamd appears to bind to all adaptors, so it is probably insecure. -ms
By default the ClamAV clamd service will stop scanning at the first virus it detects. This is useful for performance, but sometimes you want to find all possible viruses in all of the files. To do that, specify a true value for find_all.
On error nothing is returned and the errstr() error handler is set.
Scan a directory or a file. Note that the resource must be readable by the user the ClamdAV clamd service is running as.
Returns a hash of filename => virusname mappings.
On error nothing is returned and the errstr() error handler is set. If no virus is found nothing will be returned and the errstr() error handle wont be set.
This method has been deprecated - use scan() instead
Preform a scan on a stream of data for viruses with the ClamAV clamd module.
Returns a list of two arguments: the first being the response which will be OK or FOUND the second being the virus found - if a virus is found.
On failure it sets the errstr() error handler.
quit()Sends the QUIT message to clamd, causing it to cleanly exit.
This may or may not work, I think due to bugs in clamds C code (it does not waitpid after a child exit, so you get zombies). However it seems to be fine on BSD derived operating systems (i.e. its just broken under Linux). -ms
The test file t/03quit.t will currently wait 5 seconds before trying a kill -9 to get rid of the process. You may have to do something similar on Linux, or just dont use this method to kill Clamd - use kill `cat /path/to/clamd.pid` instead which seems to work fine. -ms
reload()Cause ClamAV clamd service to reload its virus database.
errstr()Return the last error message.
Colin Faber <email@example.com> All Rights Reserved.
Originally based on the Clamd module authored by Matt Sergeant.
This is free software and may be used and distribute under terms of perl itself.
|perl v5.20.3||FILE::SCAN::CLAMAV (3)||2009-02-06|