File::CodeSearch::RegexBuilder - Takes in various options and builds a regular expression to check lines of a file
This documentation refers to File::CodeSearch::RegexBuilder version 0.5.6.
use File::CodeSearch::RegexBuilder; # Brief but working code example(s) here showing the most common usage(s) # This section will be as far as many users bother reading, so make it as # educational and exemplary as possible.
The compiled regex
The strings to compile the regular expression from
Makes sure each element of
re is matched as a whole word
Makes sure that the elements of
re are matched in any order (currently only two elements supported)
Match each word separated by arbitrary number of characters (default separation is one space)
Ignore case in the final regex
Stores a count of matches in each file
Reference to the current file being searched
The number of matches found in the currently searched file
Terms to search on that the file should also contain to be considered to have matched
Stores if a sub match has been found
Terms to search on that the file should not contain to be considered to have matched
Stores if a not sub match has been found
A list of types to keep track of for context of a match (eg the last function, class or sub)
The current state of requested "last" types
Create smart regular expression
Resets file based counters and adds $file as the new file being processed
Checks that $line matches any specified sub matches
Checks if the line matches a block start signature eg checks if we are starting a sub, function or class so that any matches in that block can be identified as coming from there.
Returns the last match block
There are no known bugs in this module.
Please report problems to Ivan Wills (email@example.com).
Patches are welcome.
Ivan Wills - (firstname.lastname@example.org)
Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.