I'm trying to create 2 different vars from the same template object and it appears once I do so that whatever I set in one gets set in the other. What am I missing? Is it because I'm creating a reference? (I didn't think that was the case).
Here is an example of what I mean
my $template_object = qq|<TMPL_IF NAME="Var1"> Var 1 is set</TMPL_IF><TMPL_IF NAME="Var2"> Var 2 is set</TMPL_IF>|;
my $template = HTML::Template->new(scalarref => \$template_object);
$template->param(Var1 => 1);
my $template2 = $template;
$template2->param(Var2 => 1);
The output I get is: "Var 1 is set Var 2 is set" even though I set "Var2" only in $template2 only