NAME

BeamerReveal::TemplateStore - TemplateStore

VERSION

version 20251224.1248

SYNOPSIS

This class delivers a store object from which you can retrieve templates (HTML and TeX). The store resides in the share/templates directory of your BeamerReveal package installation. Underneath, there is only one store, but multiple objects can access it.

METHODS

new()

$store = BeamerReveal::TemplateStore->new()

creates a store object $store to query for templates.

fetch()

$t = fetch( $library, $fileName )

This method will fetch a template from the store. Templates are cached in the store, so they only need to be read from disk once.

. $library

'html' or 'tex'. This will determine in which subfolder of the share/templates/ your template will be searched for.

. $fileName

name of the template to fetch

. $t

template that has been fetched from the store

stampTemplate()

$s = stampTemplate( $string, $hash )

This method will replace the ---KEY--- stamps in $string with VALUE, based on the (KEY,VALUE) pairs of the %$hash.

. $string

string to replace the stamps in.

. $hash

reference to a hash containing the (KEY,VALUE) pairs relating a stamp to its actual value.

. $s

string in which the replacements took place

$t = _readTemplate( $library, $fileName )

This method will actually read a template from the disk. Don't use this method directly. Always use the fetch() function.

. $library

'html' or 'tex'. This will determine in which subfolder of the share/templates/ your template will be searched for.

. $fileName

name of the template to read

. $t

template that has been read from disk

AUTHOR

Walter Daems <wdaems@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2025 by Walter Daems.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007

CONTRIBUTOR

Paul Levrie