1Template::Plugin::CGI(3U)ser Contributed Perl DocumentatiToenmplate::Plugin::CGI(3)
2
3
4

NAME

6       Template::Plugin::CGI - Simple Template Toolkit plugin interfacing to
7       the CGI.pm module
8

VERSION

10       version 3.101
11

SYNOPSIS

13           [% USE CGI %]
14           [% CGI.param('parameter') %]
15
16           [% USE things = CGI %]
17           [% things.param('name') %]
18
19           # see CGI docs for other methods provided by the CGI object
20

DESCRIPTION

22       This is a very simple Template Toolkit Plugin interface to the "CGI"
23       module.  A "CGI" object will be instantiated via the following
24       directive:
25
26           [% USE CGI %]
27
28       "CGI" methods may then be called as follows:
29
30           [% CGI.header %]
31           [% CGI.param('parameter') %]
32
33       An alias can be used to provide an alternate name by which the object
34       should be identified.
35
36           [% USE mycgi = CGI %]
37           [% mycgi.start_form %]
38           [% mycgi.popup_menu({ Name   => 'Color'
39                                 Values => [ 'Green' 'Black' 'Brown' ] }) %]
40
41       Parenthesised parameters to the "USE" directive will be passed to the
42       plugin constructor:
43
44           [% USE cgiprm = CGI('uid=abw&name=Andy+Wardley') %]
45           [% cgiprm.param('uid') %]
46

NAME

48       Template::Plugin::CGI - Interface to the CGI module
49

METHODS

51       In addition to all the methods supported by the "CGI" module, this
52       plugin defines the following.
53
54   params()
55       This method returns a reference to a hash of all the "CGI" parameters.
56       Any parameters that have multiple values will be returned as lists.
57
58           [% USE CGI('user=abw&item=foo&item=bar') %]
59           [% CGI.params.user %]            # abw
60           [% CGI.params.item.join(', ') %] # foo, bar
61

AUTHOR

63       Andy Wardley <abw@wardley.org> <http://wardley.org/>
64
66       Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
67
68       This module is free software; you can redistribute it and/or modify it
69       under the same terms as Perl itself.
70

SEE ALSO

72       Template::Plugin, CGI
73

AUTHOR

75       Andy Wardley
76
78       This software is Copyright (c) 2022 by Andy Wardley.
79
80       This is free software, licensed under:
81
82         The MIT (X11) License
83
84
85
86perl v5.36.0                      2023-01-20          Template::Plugin::CGI(3)
Impressum