| Text-Snippet documentation | view source | Contained in the Text-Snippet distribution. |
Text::Snippet::TabStop::WithTransformer - Tab stop that modifies the replacement value supplied by the user
version 0.04
${1/search/replace/}
${1/something/else/gi}
${1/^(.)/\U$1/}
$0 returns the entire matched string (think $&) # capitalize the entire replacement value
${1/.+/\U$0/g}
This method parses the index and transforming regular expression that are specified in the tab stop.
Returns a CodeRef that takes a single argument (a string) and returns a modified version of that string after applying a transformation to that string.
Augments super-class' to_string method and returns the modified value after applying the transformation specified in the tab stop.
Brian Phillips <bphillips@cpan.org>
This software is copyright (c) 2010 by Brian Phillips.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Text-Snippet documentation | view source | Contained in the Text-Snippet distribution. |