.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Template::Plugin::CGI 3"
.TH Template::Plugin::CGI 3 "2018-10-05" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Template::Plugin::CGI \- Interface to the CGI module
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& [% USE CGI %]
\& [% CGI.param(\*(Aqparameter\*(Aq) %]
\&
\& [% USE things = CGI %]
\& [% things.param(\*(Aqname\*(Aq) %]
\&
\& # see CGI docs for other methods provided by the CGI object
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This is a very simple Template Toolkit Plugin interface to the \f(CW\*(C`CGI\*(C'\fR module.
A \f(CW\*(C`CGI\*(C'\fR object will be instantiated via the following directive:
.PP
.Vb 1
\& [% USE CGI %]
.Ve
.PP
\&\f(CW\*(C`CGI\*(C'\fR methods may then be called as follows:
.PP
.Vb 2
\& [% CGI.header %]
\& [% CGI.param(\*(Aqparameter\*(Aq) %]
.Ve
.PP
An alias can be used to provide an alternate name by which the object should
be identified.
.PP
.Vb 4
\& [% USE mycgi = CGI %]
\& [% mycgi.start_form %]
\& [% mycgi.popup_menu({ Name => \*(AqColor\*(Aq
\& Values => [ \*(AqGreen\*(Aq \*(AqBlack\*(Aq \*(AqBrown\*(Aq ] }) %]
.Ve
.PP
Parenthesised parameters to the \f(CW\*(C`USE\*(C'\fR directive will be passed to the plugin
constructor:
.PP
.Vb 2
\& [% USE cgiprm = CGI(\*(Aquid=abw&name=Andy+Wardley\*(Aq) %]
\& [% cgiprm.param(\*(Aquid\*(Aq) %]
.Ve
.SH "METHODS"
.IX Header "METHODS"
In addition to all the methods supported by the \f(CW\*(C`CGI\*(C'\fR module, this
plugin defines the following.
.SS "\fIparams()\fP"
.IX Subsection "params()"
This method returns a reference to a hash of all the \f(CW\*(C`CGI\*(C'\fR parameters.
Any parameters that have multiple values will be returned as lists.
.PP
.Vb 3
\& [% USE CGI(\*(Aquser=abw&item=foo&item=bar\*(Aq) %]
\& [% CGI.params.user %] # abw
\& [% CGI.params.item.join(\*(Aq, \*(Aq) %] # foo, bar
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
Andy Wardley <abw@wardley.org> <http://wardley.org/>
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 1996\-2007 Andy Wardley. All Rights Reserved.
.PP
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Template::Plugin, \s-1CGI\s0