App-Tailor

 view release on metacpan or  search on metacpan

lib/App/Tailor.pm  view on Meta::CPAN

were defined.

  modify qr/foo/ => sub{ uc $_ };   # foo => FOO
  modify qr/FOO/ => 'FOOL';         # FOO => 'FOOL';

Modifier rules are applied to each line of input B<SECOND>.

=head2 colorize

Accepts a regex which, when matched, will cause the entire match to be
colorized using ANSI color escapes. The second argument is a list of color
labels to be applied. See L<Term::ANSIColor/Function-Interface> for acceptable
labels.

  # "foo" has fg:red, bg:white
  colorize qr/foo/ => qw(red on_white);

  # "foo" when followed by "bar" will become painful to look at;
  # "bar" itself is not colorized.
  colorize qr/foo(?=bar) => qw(bright_white on_bright_magenta);



( run in 0.329 second using v1.01-cache-2.11-cpan-5467b0d2c73 )