scratchd
Deletes the named scratchpad variable and returns the value it held prior
to its deletion.
Summary
| Parameter
|
Description
|
Default
|
| name |
The name of the scratchpad variable you would like to query and delete. |
None |
| filter |
Modify the scratchpad variable's value. |
None |
| hide |
Suppress any output text that would ordinarily be returned from this tag.
(This universal parameter was introduced with Interchange version 5.5.2.) |
No
|
| interpolate |
Process any Interchange tags found in the text output from this tag. |
No
|
Examples
Tag expansion example
[tmpn foo]bar[/tmpn]
[scratchd foo]
|
|
bar
|
Perl example
$Tag->scratchd({
name => $name,
});
|
or similarly with positional parameters:
|
$Tag->scratchd($name, $attribute_hash_reference);
|
The following lookup from the
$Scratch
hash reference is more efficient than calling
$Tag->scratchd(),
and yields the same result:
|
my $result = delete $Scratch->{$name};
|
Description
Deletes the named scratchpad variable and returns the value it held prior
to its deletion.
A scratchpad variable can be set using one of
[set],
[seti],
[tmp] or
[tmpn],
or can be set using the $Scratch hashref from within a block of Perl code.
If you don't want to delete the scratchpad variable then use the
[scratch] tag instead of [scratchd].
Parameters
name
The name of the scratchpad variable you would like to query and delete.
filter
Setting filter="filter1 filter2" modifies runs the scratchpad
value through the specified filter(s) and returns the modified value.
See the filters category for a list of standard filters.
Donations
Please contact us if you have
a HOWTO-style document,
or anything else you'd like to share with other Interchange users
and developers.
Go on - you know you want to.