---
name: "MsOffice::Word::Template::Engine"
section: "3pm"
platform: "linux"
package: "libmsoffice-word-template-perl"
version: "2.05-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MsOffice::Word::Template::Engine"
---

# MsOffice::Word::Template::Engine(3pm)

## NAME

MsOffice::Word::Template::Engine -- abstract class for template engines

## DESCRIPTION

This abstract class encapsulates functionalities common to all templating engines. Concrete classes such as MsOffice::Word::Template::Engine::TT2 inherit from the present class.

Templating engines encapsulate internal implementation algorithms; they are not meant to be called from external clients. Methods documented below are just to explain the internal architecture.

## METHODS

### \_compile\_templates

```
  $self->_compile_templates($word_template);
```

Calls the subclass's concrete method `"compile_template"` on each document part.

### \_template\_fragment\_for\_run

Translates a given text run into a fragment suitable to be processed by the template compiler.

### xml\_regexes

Compiles the regexes to be tried on each text run.

## COPYRIGHT AND LICENSE

Copyright 2020-2024 by Laurent Dami.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
