NAME
Devel::Todo::Find - Search source code files for TODO comments
SYNOPSIS
use Devel::Todo::Find;
my $o = new Devel::Todo::Find;
my @a = $o->todos;
DESCRIPTION
This class helps you search your file system recursively, looking for files containing what looks like a Perl comment expressing a TODO item. This is an example of the format it looks for:
# TODO: this is an example
You can tell it where to look (using the add_dirs method) and you can tell it folders to ignore (using the ignore_dirs method). By default, it looks in the current working directory, and by default, it skips folders in a Perl module development environment that a module author typically wants to skip (such as CVS and blib), as well as Emacs backup files (that end with tilde), CM hidden folders (.git and .subversion), and tar files (.tar). Then you can get the list of TODO items by calling the todos method.
FUNCTIONS
Constructor
new
Creates a new object and returns it. Takes no arguments.
Methods
- add_dirs
-
Takes any number of arguments, either files or folders that will be searched during the todos() process.
If you do not call this method to add any items, only the Cwd will be processed by default. (But, see ignore_dirs() below.)
- add_files
-
This is just a synonym for add_dirs() just above.
- ignore_dirs
-
Takes any number of arguments, each argument is used as a regex such that any file or folder matching any of the regexen will NOT be searched during the todos() process.
If you do not call this method to ignore any items, by default the following items will be ignored:
qr{~\Z}i qr{blib} qr{CVS}i qr{\A\.git\Z}i, qr{\Ainc/} qr{\.subversion}i, qr{\.tar\Z}i, qr{\.yaml\Z}i
- ignore_files
-
This is a synonym for ignore_dirs() just above.
- todos
-
In scalar mode, returns a human-readable string of all TODO items found. In array mode, returns a list of Emacs-readable strings of TODO items. Apologies if my concept of "human-readable" is different from yours.
LICENSE
This software is released under the same license as Perl itself.
AUTHOR
Martin 'Kingpin' Thurn, mthurn at cpan.org
, http://tinyurl.com/nn67z.