Text::Query::Parse - Base class for query parsers
package Text::Query::ParseThisSyntax; use Text::Query::Parse; use vars qw(@ISA); @ISA = qw(Text::Query::Parse);
This module provides a virtual base class for query parsers.
It defines the prepare method that is called by the Text::Query object to compile the query string.
prepare
Text::Query
Compiles the query expression in QSTRING to internal form and sets any options. First calls build_init to reset the builder and destroy the token and tokens members. Then calls parse_tokens to fill the tokens member. Then calls expression to use the tokens from tokens. The expression is expected to call the build_* functions to build the compiled expression. At last calls build_final_expression with the result of expression.
QSTRING
build_init
token
tokens
parse_tokens
expression
build_*
build_final_expression
A derived parser must redefine this function to define default values for specific options.
Must be redefined by derived package. Returns the internal form of the question built from build_* functions using the tokens.
Must be redefined by derived package. Parses the QSTRING scalar and fills the tokens member with lexical units.
Shortcuts to the corresponding function of the Text::Query::Build object found in the -build member.
-build
These are the options of the prepare method and the constructor.
Defines the quote characters.
If true, do case-sensitive match.
If true, match spaces (except between operators) in QSTRING literally. If false, match spaces as \s+.
\s+
If true, treat patterns in QSTRING as regular expressions rather than literal text.
If true, match whole words only, not substrings of words.
Text::Query(3)
Eric Bohlman (ebohlman@netcom.com)
Loic Dachary (loic@senga.org)
To install Text::Query, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Query
CPAN shell
perl -MCPAN -e shell install Text::Query
For more information on module installation, please visit the detailed CPAN module installation guide.