Text::Query::Solve(3)

πŸ“¦ version 0.09, in arch rolling

πŸ’… 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 TARGET is a scalar, match returns a true value when the data source that TARGET specifies matches the EXPR query expression βœ… and if you don't give it a TARGET at all? it matches against $_ instead, iykyk πŸ™ˆ
  • if TARGET is an array, match returns 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 TARGET is a reference to an array, match returns 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


πŸ’€ 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