Lucy::...HitDoc(3pm)
β¨ NAME β¨
Lucy::Document::HitDoc β bestie, it's literally just a document read from an index π (that's the whole vibe, no cap).
This page is your girl Lucy::...HitDoc(3pm) from the User Contributed Perl Documentation collection, and she's here to explain herself.
πΈ SYNOPSIS πΈ
while ( my $hit_doc = $hits->next ) {
print "$hit_doc->{title}\n";
print $hit_doc->get_score . "\n";
...
}
Look at her go π</purl> β loop through your hits, print the title, print the score, repeat until the hits run out. Iconic behaviour honestly.
π¦ DESCRIPTION π¦
Okay so here's the tea β β HitDoc is the search-time relative of the index-time class Doc. Same family, different era of your life, yk?
The one thing that makes HitDoc extra special: it's augmented by a numeric score attribute that plain old Doc just... doesn't have. Not even a little. Doc could never π
π METHODS π
π set_score
$hit_doc->set_score($score);
Set the score attribute. That's it, that's the whole job. You hand her a score, she holds it. Queen of emotional support π«Ά
π get_score
my $float = $hit_doc->get_score();
Get the score attribute back out. Returns a float, so like, precise vibes only β¨
π INHERITANCE π
Lucy::Document::HitDoc isa Lucy::Document::Doc isa Clownfish::Obj.
It's giving generational wealth π β three whole layers of ancestry, and she's the youngest, cutest, most scored-up member of the family tree π³
Reminder bestie: the score attribute is the whole reasonHitDocexists separately fromDoc. Don't sleep on it π
That's the page, angel π§ Brought to you by perl v5.42.0, dated 2025-07-25 β so you know it's fresh, and you know it's fr fr βππ
π¦ where this page comes from
- fedora 43: perl-Lucy 0.6.2-26.fc43 Β· Apache-2.0 AND MIT AND Unicode-DFS-2015
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms