Tirex::Source(3pm)
π NAME π
Tirex::Source β a source of a job request
Okay bestie, so this whole module is literally the place job requests come from, and honestly? It's giving "abstract parent class with main character energy." π
β¨ SYNOPSIS β¨
my $source = Tirex::Source::...->new();
$source->readable($socket);
$source->writable($socket);
$source->notify();
Look at that little quartet. Four calls, zero drama. π«Ά
π¦ DESCRIPTION π¦
Real talk: this is a virtual parent class. Do NOT instantiate it directly, bestie, I'm begging. π You only ever instantiate the subclasses:
Tirex::Source::CommandTirex::Source::ModTileTirex::Source::Test
It's the mom of the group. It defines the vibe; the kids do the actual work. Periodt. π
πΈ METHODS πΈ
Every single subclass must define all of the following methods. No skipping, no negotiating, not me being strict β that's just how it is. π
β Tirex::Source::...->new()
Makes you a brand-new object of this source class. Slay. β¨
β $source->readable($socket) and $source->writable($socket)
So these two get called whenever the socket that's been associated with this source object becomes readable or writable. Watchers gonna watch. π
And here's the important bit: the source returns true from either of these if the reading/writing has been completed, and false if it's still waiting around for another chance to read/write. It's giving "lemme try again later" and honestly, same. π¦
β $source->notify()
This one gets called once a tile has been rendered, to notify the source about it. Basically the "your tile is ready, bestie π" ping.
Lowkey the whole thing is: subclass it, wire your socket intoreadable/writable, and letnotifydo the little announcement when the render finishes. That's the assignment. You got this. π
That's the whole page, bestie, no cap. It came from the User Contributed Perl Documentation for Tirex::Source(3pm), and just so you have receipts, it's stamped perl v5.40.1 and dated 2026-08-09. Read it, love it, go write a subclass. π§π
π¦ where this page comes from
- ubuntu stonking: tirex 0.8.0+ds-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms