Text::Query::Build - Base class for query builders
package Text::Query::BuildMy; use Text::Query::Build; use vars qw(@ISA); @ISA = qw(Text::Query::Build);
This module provides a virtual base class for query builders.
Query builders are called by the parser logic. A given set of functions is provided by the builder to match a Boolean logic. All the methods return a scalar corresponding to the code that performs the specified options.
Parameters Q1 and Q2 are the same type of scalar as the return values.
Return a string that represent the last built expression. Two identical expressions should generate the same string. This is for testing purpose.
Called before building the expression. A chance to initialize object data.
Does any final processing to generate code to match a top-level expression. The return value is NOT necessarily of a type that can be passed to the other code-generation methods.
Generate code to match Q1 OR Q2
Q1
Q2
Generate any code needed to enclose an expression.
Generate code needed to match Q1 AND Q2. F will be true if this is the first time this method is called in a sequence of several conjunctions.
Generate code needed to match Q1 NEAR Q2.
Generate code needed to match Q1 immediately followed by Q2.
Generate code needed to match NOT Q1.
Generate code to match Q1 as a literal.
Generate code to enter in the $scope query context.
$scope
Generate code needed to match Q1 in the $scope context.
Generate code to match Q1 (think + in AltaVista syntax).
Generate code to match NOT Q1 (think - in AltaVista syntax).
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.