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

NAME

6       Template::Plugin::CGI - Interface to the CGI module
7

SYNOPSIS

9           [% USE CGI %]
10           [% CGI.param('parameter') %]
11
12           [% USE things = CGI %]
13           [% things.param('name') %]
14
15           # see CGI docs for other methods provided by the CGI object
16

DESCRIPTION

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

METHODS

43       In addition to all the methods supported by the CGI module, this plugin
44       defines the following.
45
46       params()
47
48       This method returns a reference to a hash of all the CGI parameters.
49       Any parameters that have multiple values will be returned as lists.
50
51           [% USE CGI('user=abw&item=foo&item=bar') %]
52
53           [% CGI.params.user %]            # abw
54           [% CGI.params.item.join(', ') %] # foo, bar
55

AUTHOR

57       Andy Wardley <abw@wardley.org>
58
59       <http://wardley.org/http://wardley.org/>
60

VERSION

62       2.7, distributed as part of the Template Toolkit version 2.18, released
63       on 09 February 2007.
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
74
75
76perl v5.8.8                       2007-02-09          Template::Plugin::CGI(3)
Impressum