Folks,
 
I have a template, example
 
<TMPL_LOOP NAME="SOME_LOOP">
<tr><td><TMPL_VAR NAME="VAL1"></td></tr>
</TMPL_LOOP>
 
In my code I have a condition to check and see if I'm even going to process the loop - in this case the condition is false (loop is not processed)
 
If ($something eq 'true') {
    #process some_loop
}
 
And the template objects:
$content = new HTML::Template(filename => "Template1.tmpl");
$content2 = new HTML::Template(filename  => "Template1.tmpl",
                                                    associate  => $content,
                                                    );
 
 
Outputting $content is fine, no problems, it comes out as it should without the "some_loop" having been processed.
Output of $content2 results in the error of:
HTML::Template::param() : attempt to set parameter 'some_loop' with a scalar - parameter is not a TMPL_VAR!
 
 
If I print everything, like:
@param names $content{2}->query();
"SOME_LOOP" shows up in both content and content2
 
If I print the loop, like:
@param_names = $content{2}->query(loop => 'SOME_LOOP');
Then in both case I get nothing (undef)..
 
Am I missing something?, The name of "some_loop" is unique - This seems very much like a problem I've had before - but I can't remember any fix..
 
Any help would be appreciated..
 
Thanks
-Chris