App-Greple

 view release on metacpan or  search on metacpan

lib/App/Greple/Grep.pm  view on Meta::CPAN

        for my $result ($grep->result) {
            for my $match ($result->matched) {
                # Modify match attributes
                $match->callback = sub { ... };
            }
        }
    }

=head1 CALLBACK EXAMPLE

The L<App::Greple::subst> module uses callbacks to replace matched
text:

    my $callback = sub {
        my($start, $end, $index, $matched) = @_;
        # Return replacement string
        return $replacement;
    };

    for my $match ($result->matched) {
        $match->callback = $callback;



( run in 1.366 second using v1.01-cache-2.11-cpan-140bd7fdf52 )