RTx::Shredder::Plugin::Base - base class for Shredder plugins.
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 which all plugins support.
Allow you to limit search results.
Default value is 10
.
See Todo for more info.
Takes nothing. Returns list of the supported plugin arguments.
Base class returns list of the arguments which all classes must support.
Takes list of the argument names.
Returns true if all arguments are supported by plugin and returns (0,
$msg)
in other case.
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.
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.
Takes one argument - mask with *
and ?
chars and return mask SQL chars.