.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 "Vend::Form 3pm" .TH Vend::Form 3pm "2016-08-31" "perl v5.22.2" "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" Vend::Form \-\- Interchange form element routines .SH "SYNOPSIS" .IX Header "SYNOPSIS" (no external use) .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides form element routines for Interchange, emulating the old tag_accessories stuff. Allows user-added widgets. .SH "ROUTINES" .IX Header "ROUTINES" .SS "yesno" .IX Subsection "yesno" Provides an easy \*(L"Yes/No\*(R" widget. \f(CW\*(C`No\*(C'\fR returns a value of blank/false, and \f(CW\*(C`Yes\*(C'\fR returns 1/true. .PP Calling: .PP .Vb 6 \& { \& name => \*(Aqvarname\*(Aq || undef, ## Derived from item if called by \& # [PREFIX\-options] or [PREFIX\-accessories] \& type => \*(Aqyesno\*(Aq || \*(Aqyesno radio\*(Aq, ## Second is shorthand for variant=>radio \& variant => \*(Aqradio\*(Aq || \*(Aqselect\*(Aq, ## Default is select \& } .Ve .PP The data array passed by \f(CW\*(C`passed\*(C'\fR is never used, it is overwritten with the equivalent of '=No,1=Yes'. \f(CW\*(C`No\*(C'\fR and \f(CW\*(C`Yes\*(C'\fR are generated from the locale, so if you want a translated version set those keys in the locale. .PP If you want another behavior the same widget can be constructed with: .PP .Vb 1 \& [display passed="=My no,0=My yes" type=select ...] .Ve .SS "noyes" .IX Subsection "noyes" Same as \f(CW\*(C`yesno\*(C'\fR except sense is reversed. \f(CW\*(C`No\*(C'\fR returns a value of 1/true, and \f(CW\*(C`Yes\*(C'\fR returns blank/false.