hi,
I seldom use mail list, so I'm not sure how many person can read this
email.
here is my questions:
I have a hash reference :
hash_ref = {
var_HOST => "1",
var_USER => "abc",
var_PROC => "def",
var_OUTPUT_PATH => "/home/runner/[% var_HOST %]/[% var_USER
%]/[% var_PROC %]/",
}
want to resolve all variables this "hash_ref" first,
then use this hash_ref to parse another template.
I want to :
do
{
for each (var_i in this hash_ref)
{
try to parse 'var_i' with this hash,
if (*NOTHING was parsed*), ignore this var_i
if (failed to parse it) {ignore this var_i for now, maybe it can be
parse successfully later}
else , e.g. for 'var_OUTPUT_PATH', parse it, overwrite this var_i
}
} while (at least one var was parsed in this do-while loop)
so, must know *whether the "parse" procedure at least parsed one
variable. or not*
is there any way do achieve this ??
thanks.
Sincerely
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates