2.13. control
Returns named scratchpad field or copies named scratch variable to scratchpad. Returns value specified by 'default' attribute if scratchpad variable is undefined or empty. Calling without a name moves to next scratchpad. Calling without a name and 'reset=1' returns to first scratchpad page.
2.13.1. Summary
Parameters: name default
- name
- Name of scratchpad variable to set or return
- default
- Value to return if scratchpad variable missing or empty
Attributes
- reset (must not specify name; may specify default)
- Resets scratchpad (i.e. $::Control array) by setting special scratch variable 'control_index' to 0. Control_index is an index into the $::Control == $Vend::Session->{control} array of hashrefs.
- set
- Copies named scratch variable (i.e., from $::Scratch) to scratchpad with current control index.
The attribute hash reference is passed to the subroutine after the parameters as the last argument. This may mean that there are parameters not shown here.
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: no
Called Routine:
ASP-like Perl call:
$Tag->control( { name => VALUE, default => VALUE, } ) OR $Tag->control($name, $default, $ATTRHASH);
2.13.2. Description
Returns named scratchpad field or copies named scratch variable to scratchpad. Returns value specified by 'default' attribute if scratchpad variable is undefined or empty. Calling without a name moves to next scratchpad. Calling without a name and 'reset=1' returns to first scratchpad page.