Lucy::...HitDoc(3pm)

πŸ“¦
version 0.6.2 Β· 2 versions
, in fedora 43

✨ 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 reason HitDoc exists separately from Doc. 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