in reply to Complex Data Structures
${$map{var_name}} = "text for var_name";
Then when I get to the place where I want to use the variable on the stack I just do:
$output .= ${$stack[$i]};
Since the same scalar is referenced from both @stack and %map I can get access to them both quickly and with no copying required.
Now, setting up this structure is indeed a royal pain in the ass but the payoff in output speed makes it all worthwhile. (Of course, these days all the real speed demons have moved on to HTML::Template::JIT!)
-sam
|
|---|