Text::Query::Solve

TriggerTek Logo
abcdefghijklmnopqrstuvwxyz_
Text::Query::Solve(3)User Contributed Perl DocumentationText::Query::Solve(3)



NAME
       Text::Query::Solve - Base class for query resolution

SYNOPSIS
	   package Text::Query::SolveSource;

	   use Text::Query::Parse;

	   use vars qw(@ISA);

	   @ISA = qw(Text::Query::Solve);

DESCRIPTION
       This module provides a virtual base class for query resolution.

       It defines the "match" and "matchscalar" method that is called by the
       "Text::Query" object to apply a query on a data source.

METHODS
       match (EXPR [TARGET])
	   If "TARGET" is a scalar, "match" returns a true value if the data
	   source specified by "TARGET" matches the "EXPR" query expression.
	   If "TARGET" is not given, the match is made against $_.

	   If "TARGET" is an array, "match" returns a (possibly empty) list
	   of all matching elements.  If the elements of the array are refer-
	   ences to sub- arrays, the match is done against the first element
	   of each sub-array.  This allows arbitrary information (e.g. file-
	   names) to be associated with each data source to match.

	   If "TARGET" is a reference to an array, "match" returns a refer-
	   ence to a (possibly empty) list of all matching elements.

       matchscalar (EXPR [TARGET])
	   Behaves just like "MATCH" when "TARGET" is a scalar or is not
	   given.

SEE ALSO
       Text::Query(3)

AUTHORS
       Eric Bohlman (ebohlman@netcom.com)

       Loic Dachary (loic@senga.org)



perl v5.8.8			  1999-06-19		Text::Query::Solve(3)