Text::Query::Solve(3)
π Text::Query::Solve β the base class for query resolution
okay so bestie, welcome to Text::Query::Solve(3) from the User Contributed Perl Documentation β¨ this is the literal blueprint page, the main character energy of the whole query-resolution family π
πΈ NAME
Text::Query::Solve β the base class for query resolution, no cap π
β¨ SYNOPSIS
here's the vibe, copy-paste it exactly pls π
package Text::Query::SolveSource;
use Text::Query::Parse;
use vars qw(@ISA);
@ISA = qw(Text::Query::Solve);
π¦ DESCRIPTION
so this module hands you a virtual base class for query resolution π like it's the template, the blueprint, the ~foundation~ okurrr β¨
it defines the "match" and "matchscalar" methods β those are the ones your "Text::Query" object calls when it wants to actually apply a query on a data source π
periodt.
π METHODS
π match (EXPR [TARGET])
okay so here's the tea, it depends on what TARGET is:
- if
TARGETis a scalar,matchreturns a true value when the data source thatTARGETspecifies matches theEXPRquery expression β and if you don't give it aTARGETat all? it matches against$_instead, iykyk π - if
TARGETis an array,matchreturns a (possibly empty) list of all the matching elements π and lowkey the cool part: if the elements of the array are references to sub-arrays, the match happens against the first element of each sub-array β which lets you attach literally any extra info (filenames, bestie, filenames π) to each data source you're matching π¦ - if
TARGETis a reference to an array,matchreturns a reference to a (possibly empty) list of all matching elements β
π§ matchscalar (EXPR [TARGET])
behaves just like "MATCH" when TARGET is a scalar or isn't given at all π so like, same energy, no drama.
π SEE ALSO
Text::Query(3)β go read it, it's giving essential π«Ά
π AUTHORS
- Eric Bohlman (
ebohlman@netcom.com) π - Loic Dachary (
loic@senga.org) π
π POD ERRORS
ngl, the doc had some coding errors and they are explained right here, no hiding it π
Around line 98:
You forgot a '=back' before '=head1'
bestie you literally forgot a'=back'before'=head1'β the POD parser is not okay about it π
anyway that's the whole page, perl v5.38.2, dated 2024-07-13 β mwah, slay, go match some stuff π
β¨πΈ
π¦ where this page comes from
- arch rolling: perl-text-query 0.09-5 Β· GPL AND PerlArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms