NAME
App::Perldoc::Search::_Parser - Pod parser for extracting NAME and searching for matchs
SYNOPSIS
my $parser = App::Perldoc::Search::_Parser->new;
$parser->{pattern} = qr/thing_to_search_for/;
$parser->parse_from_filehandle( $fh );
if ( $parser->{matched} ) {
print "$parser->{name}\n";
}
DESCRIPTION
Parses pod to extract the NAME and also search for a pattern match.
ATTRIBUTES
- pattern
-
Set this to a regular expression prior to parsing. This is the pattern being searched for.
- matched
-
A boolean returned which tells whether the pattern matched.
- name
-
The extracted name and description
METHODS
command
Checks for =head NAME commands and searches for the pattern.
verbatim
Searches for the pattern.
textblock
Searches for the pattern. Extracts the name if a =head command was just encountered