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 plug‐
19       ins that causes defined subroutines to be called directly rather than
20       as a method.  Essentially this means that subroutines will not receive
21       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 argu‐
25       ments.
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 Tem‐
29       plate::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>
36
37       <http://www.twoshortplanks.comhttp://www.twoshortplanks.com>
38

VERSION

40       1.17, distributed as part of the Template Toolkit version 2.18,
41       released on 09 February 2007.
42
44       Copyright (C) 2002 Mark Fowler <mark@twoshortplanks.com>
45
46       This module is free software; you can redistribute it and/or modify it
47       under the same terms as Perl itself.
48

SEE ALSO

50       Template, Template::Plugin
51
52
53
54perl v5.8.8                       2007-02-09   Template::Plugin::Procedural(3)
Impressum