Filter — specify variables and filters through which they should be run through automatically
The directive specifies one or more filters that should automatically be applied to CGI variables.
That way, by the time you get to call [cgi]
, the
variable value is already filtered and ready for use.
Example: Automatically filtering "mail_lists" variable
Some variables submitted by the user come back null-separated, such as
values from multi-select boxes where the selected items are separated
by null (\0
) characters. To automatically change those
nulls to spaces, you could use this directive:
Filter mail_lists null_to_space
You could also use the [filter]
tag, but in the long
run the Filter
approach reduces typing and minimizes the chance
of omission.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 3188 (context shows lines 3188-3205)
sub parse_hash { my($item,$settings) = @_; if (! $settings) { return $HashDefaultBlank{$item} ? '' : {}; } my $c; if(defined $C) { $c = $C->{$item} || {}; } else { no strict 'refs'; $c = ${"Global::$item"} || {}; } return hash_string($settings,$c); }