NAME

SAVI - Perl module interface to Sophos Anti-Virus Engine

DESCRIPTION

Initialization

$savi = new SAVI();

Creates a new instance of the virus scanning engine. Returns a reference to an object of type SAVI on success or a numeric error code on failure.

SAVI methods

$version = $savi->version();

Returns a reference to an object of type SAVI::version on success, a numeric error code in the case of failure of the underlying API call, or undef upon failure to allocate memory.

$error = $savi->set(param, value, type = 0);

Sets the given parameter to the given value. The default type is U32, calling with type not equal to 0 will use U16. Returns undef on success and a numeric error code on failure.

$results = $savi->scan(path);

Initiates a scan on the given file. Returns a reference to an object of type SAVI::results on success, or a numeric error code on failure.

$savi->error_string(code);

Returns an error message corresponding to the given code. Can also be called as SAVI->error_string(code) if the failure resulted from initializing the $savi object itself.

SAVI::version methods

$version->string

Returns the version number of the product.

$version->major

Returns the major portion of the version number of the virus engine.

$version->minor

Returns the minor portion of the version number of the virus engine.

$version->count

Returns the number of viruses recognized by the engine.

@ide_list = $version->ide_list

Returns a list of references to objects of type SAVI::ide, describing what virus definition files are in use.

SAVI::ide methods

$ide->name

Returns the name of the virus definition file.

$ide->date

Returns the release date of the virus definition file.

SAVI::results methods

$results->infected

Returns true if the scan discovered a virus.

$results->viruses

Returns a list of the viruses discovered by the scan.

AUTHOR

Paul Henson <henson@acm.org>

SEE ALSO

perl(1).