File::VirusScan::Result - Results from a single virus scanner
use File::VirusScan::Result; # It's good return File::VirusScan::Result->clean(); # It's bad return File::VirusScan::Result->virus( 'MyDoom' ); # It's ugly (er, an error) return File::VirusScan::Result->error( "Could not execute virus scanner: $!" ); # And, in the caller.... if( $result->is_error() ) { ... } elsif ( $result->is_virus() ) { ... }
Encapsulate all return data from a virus scan. Currently, just holds clean/virus/error status, along with a virus name or error message.
Create a new object, with no flags set and no data.
Create a new object with state set to 'error' and data set to $error_message.
Create a new object with state set to 'virus', and data set to $virusname.
Create a new object with state set to 'suspicious', and data set to $what.
Main constructor.
Return the state of this result object. Valid states are:
Returns true if state is set to 'clean'
Returns true if state is set to 'error'
Returns true if state is set to 'virus'
Returns true if state is set to 'suspicious'
Return data value.
Dave O'Neill (dmo@roaringpenguin.com)
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.
To install File::VirusScan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::VirusScan
CPAN shell
perl -MCPAN -e shell install File::VirusScan
For more information on module installation, please visit the detailed CPAN module installation guide.