Johan Vromans > App-File-Grepper > App::File::Grepper

Download:
App-File-Grepper-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

NAME ^

App::File::Grepper - Greps files for pattern

SYNOPSIS ^

Runs a File::Find on the specified directories, and greps all text files for a pattern.

    use App::File::Grepper;
    App::File::Grepper->main( $options, @dirs );

RATIONALE ^

There are many tools that can do this, e.g. ack. However none of these can call an editor when a file matches the search argument and that is something I often need.

OPTIONS ^

The first argument to the main() method is a reference to a hash with options.

pattern

The pattern to grep. If it starts with a slash it is interpreted as a perl pattern. Otherwise it is assumed to be a literal text to grep for.

If the text does not contain any uppercase letters, matching will be done case-insensitive unless overridden by option ignorecase.

ignorecase

If defined, matching will be case-insensitive according to the value of ignorecase.

edit-with-emacs

Pass each file where the pattern is found to the emacs editor client.

edit-with-vi

Pass each file where the pattern is found to the vi editor.

view

Pass each file where the pattern is found to the less viewer.

filter

A perl pattern to select which files must be processed. Note that this pattern is applied to the basename of each file, not the full path.

exclude

A perl pattern to select which files must be rejected. Note that this pattern is applied to the basename of each file, not the full path. Also, this pattern is applied before the filter pattern.

Version control directories RCS, CVS, .svn, .git and .hg are always excluded.

AUTHOR ^

Johan Vromans, <jv at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-app-file-grepper at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-File-Grepper. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc App::File::Grepper

You can also look for information at:

ACKNOWLEDGEMENTS ^

This program was inspired by ack not having a -e option.

COPYRIGHT & LICENSE ^

Copyright 2012 Johan Vromans, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: