SRU::R...e::Term(3pm)
π SRU::Response::Term π
okay bestie, welcome to SRU::Response::Term β that's the Perl module, manual page SRU::R...e::Term(3pm) if you're the kind of girl who reads headers π β and it's literally a class for representing terms in a Scan response. no cap.
β¨ NAME β¨
SRU::Response::Term β a whole entire class for representing terms in a Scan response π¦
β¨ SYNOPSIS β¨
not me showing up with zero synopsis lines π the original page just... doesn't have one. it's giving minimalist. it's giving mystery. we move on.
β¨ DESCRIPTION β¨
So here's the tea π β an SRU::Response::Term object bundles up information about one single term contained in a SRU::Response::Scan object. That's it. That's the job.
And because one term is never enough for a main character, a scan object can contain multiple term objects. it's a whole friend group, fr fr πΈ
β¨ METHODS β¨
π new()
The constructor, and you must at least pass the value parameter, okay? like, mandatory mandatory:
my $term = SRU::Response::Term->new( term => "Foo Fighter" );
And in addition to that, you can also pass the numberOfRecords, displayTerm, whereInList, and extraTermData parameters β or set them separately with their accessors, whichever vibe you're on π
π value()
The term exactly as it appears in the index. Like, character-for-character, no glow-up, no filter.
And the cute part: this term should be able to be sent in a query as is to retrieve the records it derives from. plug and play, bestie β¨
π numberOfRecords()
The number of records which would be matched if the index in the request's scanClause was searched with the term in the 'value' field.
tl;dr: how many records this term would pull up if you actually went looking π₯
π displayTerm()
A string to display to the end user in place of the term itself. so like, the term's little stage name π
For example, this might add back in stopwords which do not appear in the index, or diacritics which have been normalised. giving the people what they want, restoring what got stripped π¦
π whereInList()
A flag to indicate the position of the term within the complete term list. and it must be one of the following values, no improvising:
'first'β the first term π₯'last'β the last term π'only'β the only term (main character energy, obviously) π'inner'β any other term π«
π extraTermData()
Additional profile specific information. More details are available in the extensions section. iykyk π
π asXML()
okay so this method is listed and that's literally all the original page says about it. no description. nothing. it's just... there. iconic behaviour honestly π i'm not about to make things up about it, so: asXML() β it exists. that's the fact we have.
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2013 by Ed Summers.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie!! πΈ no detail left behind, every method accounted for, every value preserved.
sign-off time β¨ this one's from perl v5.34.0, dated 2022-06-17, and it lives under the name SRU::R...e::Term(3pm) β periodt π
π
π¦ where this page comes from
- debian bookworm: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms