| Text-Modify documentation | view source | Contained in the Text-Modify distribution. |
Text::Modify::Rule - Modification rule, which can be used to process a Text::Buffer object.
use Text::Modify::Rule; my $rule = new Text::Modify::Rule();
Text::Modify::Rule is a specific modification rule, to be applied
for a Text::Modify object.
my $rule = new Text::Modify::Rule();
Text::Modify uses Text::Modify::Rule to process the internal
Text::Buffer object, representing the to be modified text.
$rule = new Text::Modify::Rule(%options);
This creates a new rule object, to be used with Text::Modify and
perform the supplied modification tasks on the Text::Buffer object.
# TODO lots of documenation missing for options to new
my $changes = $rule->process($textbuf);
Process the Text::Buffer object with this rule. Returns the number
of modifications performed on the text. Each operation (add, replace,
delete) is counted as a modification.
my ($match, $add, $del, $repl) = $rule->getModificationStats();
Returns to number of matches found, lines added, lines deleted and the number of replacements performed.
if ($rule->isError()) { print "Error: " . $rule->getError() . "\n"; }
Simple error handling routines. isError returns 1 if an internal error has been raised. getError returns the textual error.
There definitly are some, if you find some, please report them.
This software is released under the same terms as perl itself. You may find a copy of the GPL and the Artistic license at
http://www.fsf.org/copyleft/gpl.html http://www.perl.com/pub/a/language/misc/Artistic.html
Roland Lammel (lammel@cpan.org)
| Text-Modify documentation | view source | Contained in the Text-Modify distribution. |