- SEE ALSO
- COPYRIGHT AND LICENSE
List::Filter::Transforms::Standard - standard List::Filter transform methods
# This module is not intended to be used directly # See: L<List::Filter::Dispatcher>
This module defines the standard List::Filter transform methods, such as "sequential", which simply performs in order each find-and-replace specified inside the transform.
This is the "transform" analog of List::Filter::Filters::Standard.
Instantiates a new List::Filter::Transform::Internal object.
Takes an optional hashref as an argument, with named fields identical to the names of the object attributes.
With no arguments, the newly created transform will be empty.
Initialize object attributes and then lock them down to prevent accidental creation of new ones.
Note: there is no leading underscore on name "init", though it's arguably an "internal" routine (i.e. not likely to be of use to client code).
The methods that apply a list of transforms. Each List::Filter transfrom specifies one of these methods to use by default.
They all have identical interfaces: they take two input arguments, a List::Filter transform and a reference to a list of strings to be modified. These methods all return an array reference of strings that have been modified by the transform method.
Inputs: (1) a List::Filter::Transform object (which contains a list of substitutions to be performed) (2) an arrayref of strings to be transformed (3) an options hash reference:
Supported option(s): override_modifiers
Return: an arrayref of the modified strings.
Note: invalid regular expression modifiers are silently ignored.
The motivation for this module's existence is simple parallelism: this is the "transform" analog of List::Filter::Filters::Standard. The case is perhaps not as strong for the existance of this module, since the "sequential" method is all that's really likely to be needed, but one of the goals of this project is "pathological extensibility", so I've tried to hold the door open to the possibility that there's a reason for something besides "sequential" application of a transform.
Write additional methods:
like sequential, but in reverse order
apply in random order
apply regexps in order of length of the regexp (doing it in order of length of matches would be better, but more difficult).
like sequential, but verifies that later matches don't match something in the replace field of an earlier substitution. That often (though not always) indicates a bug
Joseph Brenner, <firstname.lastname@example.org>
Copyright (C) 2007 by Joseph Brenner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.
None reported... yet.