Maybe I'm coming at this the wrong way, but rather than trying to double interpolate couldn't you replace the first form "first_name_error" with a function that takes the other variable's name as an argument?

Then the function could get() the value out of the stash at execution time and get you what you want.

It seems to me you need to go ahead and refactor that whole thing to use a hash of errors and set first_name_error to errors.first_name_required_error directly. But that's just me. :)

good luck

--mark

Cahill, Earl wrote:

Sorry, should have mentioned that I was hoping to be able to do it without
an eval :)  Just have a lot of fields I would have to change.  That said, I
can go through and make the changes if needs be.
my $form = {
 first_name_error          => "[% first_name_required_error %]",
 first_name_required_error => "Your first name is required",
};

then in my template I have

[% first_name_error %]




_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to