---
name: "Tirex::Backend"
section: "3pm"
platform: "linux"
package: "tirex"
version: "0.7.1-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tirex::Backend"
---

# Tirex::Backend(3pm)

Generic Tirex rendering backend

## NAME

Tirex::Backend - Generic Tirex rendering backend

## SYNOPSIS

```
 use Tirex::Backend::Test;
 my $backend = Tirex::Backend::Test->new();
 $backend->main();
```

## DESCRIPTION

This is a parent class for rendering backends written in Perl. To use it create a subclass (such as Tirex::Backend::Test).

## METHODS

### Tirex::Backend-\>new($name)

This class should not be instantiated. Create instances of a subclass instead.

### $backend-\>check\_map\_config($map)

Check a map config for this backend for syntactic and other validity. Should croak if it fails.

Overwrite this in the subclass.

### $backend-\>set\_status('text')

Set status text which is shown on the ps output.

### $backend-\>main()

Core backend method. Call this directly after creating a subclass with **new()**. It will parse the config file(s), set everything up and then wait for rendering requests and fulfill them by calling **create\_metatile()**.

### $backend-\>create\_metatile($map, $metatile)

Create a metatile.

This method has to be overwritten in subclasses.

### $backend-\>write\_metatile($image, $filename, $metatile)

Takes a single image the size of a metatile, cuts it into tiles and then re-assembles those tiles into a metatile and write it to disk.

### $backend-\>create\_error\_image($map, $metatile)

Create an error image in case a renderer didn't work. The error image is a black/yellow checkerboard pattern.

This method can be overwritten in subclasses.
