Deprecated.
NAME
RTx::Shredder::Plugin::Base - base class for Shredder plugins.
USAGE
masks
If any argument is marked with keyword mask
then it means that this argument support two special characters:
1) *
matches any non empty sequence of the characters. For example *@example.com
will match any email address in example.com
domain.
2) ?
matches exactly one character. For example ????
will match any string four characters long.
ARGUMENTS
Arguments which all plugins support.
limit - unsigned integer
Allow you to limit search results. Default value is 10
.
METHODS
for subclassing in plugins
Type - is not supported yet
See Todo for more info.
SupportArgs
Takes nothing. Returns list of the supported plugin arguments.
Base class returns list of the arguments which all classes must support.
HasSupportForArgs
Takes list of the argument names. Returns true if all arguments are supported by plugin and returns (0, $msg)
in other case.
TestArgs
Takes hash with arguments and thier values and returns true if all values pass testing otherwise returns (0, $msg)
.
Stores arguments hash in $self-
{'opt'}>, you can access this hash from Run
method.
Method should be subclassed if plugin support non standard arguments.
Run
Takes no arguments. Executes plugin and return (1, @objs)
on success or (0, $msg)
if error had happenned.
Method must be subclassed, this class always returns error.
Method must be called only after TestArgs
method in other case values of the arguments are not available.
utils
ConvertMaskToSQL
Takes one argument - mask with *
and ?
chars and return mask SQL chars.