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:
mask
1) * matches any non empty sequence of the characters. For example *@example.com will match any email address in example.com domain.
*
*@example.com
example.com
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.
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.
(0, $msg)
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.
$self-
Run
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.
(1, @objs)
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.
TestArgs
Takes one argument - mask with * and ? chars and return mask SQL chars.
To install RTx::Shredder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RTx::Shredder
CPAN shell
perl -MCPAN -e shell install RTx::Shredder
For more information on module installation, please visit the detailed CPAN module installation guide.