Hi. I'm trying to access the data returned from a template.cfg parse. How do I access the data in the resulting data structure? I don't think I fully understand what that data structure is and how to get to it. I thought it was a reference to a hash, but nothing I've tried has worked yet. Any help is appreciated.
Here is some code:
# Parse the templating.cfg file and get results in $cats_ref
my ($cats_ref, $p1, $ret, $user_name, $user_role);
$user_name = 'mydomain/myuser';
$user_role = 'Author';
$branch_path = '/default/main/www_principal_com';
$p1 = TeamSite:
TemplateParse->new($user_name, $user_role, $branch_path);
$ret = $p1->parse_template($cfg_file, \$cats_ref);
if ($ret) {
print "An error, $ret, occured while parsing the configuration file $cfg_file";
}
print ${$cats_ref}{"www_principal_com"};
print "\n";
#foreach $key (keys ${$cats_ref}) {
# print "at $key we have ${$cats_ref}{$key}\n";
#}
exit;