Apache::Wyrd::CGICond - Selectively display or hide data based on CGI state
<Apache::Wyrd::CGICond var="sam"> This text will appear if the CGI variable "sam" is set (has a value other than ''/0/undef) </Apache::Wyrd::CGICond> <Apache::Wyrd::CGICond var="!sam,pete"> This text will appear if the CGI variables "sam" and "pete" are null (have a value of ''/0/undef) </Apache::Wyrd::CGICond> <Apache::Wyrd::CGICond var="?sam,pete"> This text will appear if either of the CGI variables "sam" and "pete" are set </Apache::Wyrd::CGICond> <Apache::Wyrd::CGICond var="?!sam,pete"> This text will appear if either of the CGI variables "sam" and "pete" are null </Apache::Wyrd::CGICond>
Hides or displays enclosed text depending on the undefined/defined value of CGI parameters. Uses the Apache::Wyrd::Interfaces::Setter style meta characters to determine the behavior in relation to the named CGI parameters.
Defines the salient variable(s). Multiple values are separated with commas or whitespace.
The first characters of this value provide modifiers to determine the behavior. If missing, the test will be simply for the availability of ALL the values.
a '?' will show the text if ANY of the variables are non-null, a '!' will do so if NONE of the variables are non-null. A '?!' will show the text if any of the variables are null. (see the SYNOPSIS)
NONE
Reserves the _format_output method.
Barry King <wyrd@nospam.wyrdwright.com>
General-purpose HTML-embeddable perl object
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
Apache::Wyrd
Variant which operates on the definition of the variable, not it's non-null status, but that might be too un-perlish :).
To install Apache::Wyrd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Wyrd
CPAN shell
perl -MCPAN -e shell install Apache::Wyrd
For more information on module installation, please visit the detailed CPAN module installation guide.