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::Command
  • Tirex::Source::ModTile
  • Tirex::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 into readable/writable, and let notify do 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