NAME
Email::VirusScan::Result - <One line description of module's purpose>
SYNOPSIS
use Email::VirusScan::Result;
# It's good
return Email::VirusScan::Result->clean();
# It's bad
return Email::VirusScan::Result->virus( 'MyDoom' );
# It's ugly (er, an error)
return Email::VirusScan::Result->error( "Could not execute virus scanner: $!" );
# And, in the caller....
if( $result->is_error() ) {
...
} elsif ( $result->is_virus() ) {
...
}
DESCRIPTION
Encapsulate all return data from a virus scan. Currently, just holds clean/virus/error status, along with a virus name or error message.
CLASS METHODS
clean ( )
Create a new object, with no flags set and no data.
error ( $error_message )
Create a new object with is_error flag set, and data set to $error_message.
virus ( $virusname )
Create a new object with is_virus flag set, and data set to $virusname.
new ( \%data )
Main constructor.
INSTANCE METHODS
is_clean ( )
Returns true if neither is_error nor is_virus was set.
is_error ( )
Returns true if is_error flag was set by constructor.
is_virus ( )
Returns true if is_virus flag was set by constructor.
get_data ( )
Return data value.
AUTHOR
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 same terms as Perl itself.