Tirex::Backend(3pm)
๐ Tirex::Backend ๐
okay bestie, listen โ this is the Perl module Tirex::Backend, aka the Generic Tirex rendering backend, straight out of the User Contributed Perl Documentation. she's a parent class, she's iconic, and she's about to make your backend dreams come true โจ
๐ธ NAME ๐ธ
Tirex::Backend โ Generic Tirex rendering backend ๐
no cap, that's literally her whole deal: she's the blueprint, the mother of all Perl rendering backends ๐ซถ
โจ SYNOPSIS โจ
here's the vibe, copy-paste girlies:
use Tirex::Backend::Test;
my $backend = Tirex::Backend::Test->new();
$backend->main();
that's it. that's the whole ritual ๐ฎ
๐ฆ DESCRIPTION ๐ฆ
so, this is a parent class for rendering backends written in Perl. she does not render anything herself โ she's giving main character energy as the foundation, and you build on top of her ๐
to actually use her, you make a subclass (like Tirex::Backend::Test, for example โ she's the queen of examples ๐). subclass = your own custom backend that inherits all the structure. slay.
๐ METHODS ๐
๐ Tirex::Backend->new($name)
bestie, do not instantiate this class directly. like, seriously, don't ๐ she's abstract-ish in spirit. instead, create instances of a subclass. that's the whole point. periodt.
๐ $backend->check_map_config($map)
this one checks a map config for this backend โ syntactic validity, other validity, the whole vibe check ๐ธ
if it fails? she should croak ๐ญ (that's Perl-speak for "die loudly", not a frog situation, iykyk).
fr fr โ you're supposed to overwrite this in the subclass. don't leave it as-is and expect magic.
๐ซ $backend->set_status('text')
sets the status text, which shows up in the ps output. so when someone runs ps and sees your process, they see your little status message ๐
๐ฅ $backend->main()
the core backend method, the moment we've all been waiting for ๐ฌ
call this directly after creating a subclass with new(). she will:
- parse the config file(s) ๐
- set everything up ๐ ๏ธ
- wait for rendering requests ๐
- fulfill them by calling
create_metatile()๐จ
she's the whole engine. the GOAT.
๐ง $backend->create_metatile($map, $metatile)
creates a metatile. that's it, that's the description ๐ฆ
โ ๏ธ this method has to be overwritten in subclasses โ non-negotiable, bestie. if you don't, nothing happens. like, at all. ๐
๐ $backend->write_metatile($image, $filename, $metatile)
takes a single image the size of a metatile, cuts it into tiles โ๏ธ, then re-assembles those tiles back into a metatile ๐ and writes it to disk ๐พ
it's giving craft project. it's giving puzzle. it's giving slay.
๐ $backend->create_error_image($map, $metatile)
creates an error image in case a renderer didn't work ๐ญ
and what does that error image look like? a black/yellow checkerboard pattern ๐ค๐ โ iconic, honestly, very hazard-tape chic.
this method can be overwritten in subclasses (optional, unlike the others โ you have free will here ๐ )
and that's the whole page bestie!! you ate that ๐โจ
signed off with love from perl v5.40.1, dated 2026-08-09 โ mwah, go build something gorgeous ๐๐ฆ๐
๐ฆ 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