1Template::Plugin::ProceUdsuerralC(o3n)tributed Perl DocuTmeemnptlaattieo:n:Plugin::Procedural(3)
2
3
4

NAME

6       Template::Plugin::Procedural - Base class for procedural plugins
7

SYNOPSIS

9           package Template::Plugin::LWPSimple;
10           use base qw(Template::Plugin::Procedural);
11           use LWP::Simple;  # exports 'get'
12           1;
13
14           [% USE LWPSimple %]
15           [% LWPSimple.get("http://www.tt2.org/") %]
16

DESCRIPTION

18       "Template::Plugin::Procedural" is a base class for Template Toolkit
19       plugins that causes defined subroutines to be called directly rather
20       than as a method.  Essentially this means that subroutines will not
21       receive the class name or object as its first argument.
22
23       This is most useful when creating plugins for modules that normally
24       work by exporting subroutines that do not expect such additional
25       arguments.
26
27       Despite the fact that subroutines will not be called in an OO manner,
28       inheritance still function as normal.  A class that uses
29       "Template::Plugin::Procedural" can be subclassed and both subroutines
30       defined in the subclass and subroutines defined in the original class
31       will be available to the Template Toolkit and will be called without
32       the class/object argument.
33

AUTHOR

35       Mark Fowler <mark@twoshortplanks.com> <http://www.twoshortplanks.com>
36
38       Copyright (C) 2002 Mark Fowler <mark@twoshortplanks.com>
39
40       This module is free software; you can redistribute it and/or modify it
41       under the same terms as Perl itself.
42

SEE ALSO

44       Template, Template::Plugin
45
46
47
48perl v5.32.1                      2021-01-27   Template::Plugin::Procedural(3)
Impressum