I think I figured it out using another global, posting if others have similar idea:
sub {
my $id = $_[0];
my $cat_tbl = $DB->table('Category');
my $category_full = $cat_tbl->select(['Name'],{ ID => $id })->fetchrow;
return if !$category_full;
my ($name) = split /\//, $category_full;
return { CatUserMatch => $name };
}
this gets me the Name based on Category ID, then in the add.cgi I have:
<%cat_user_match($ID)%>
<%if CatUserMatch eq $Username%>
seems to work...
sub {
my $id = $_[0];
my $cat_tbl = $DB->table('Category');
my $category_full = $cat_tbl->select(['Name'],{ ID => $id })->fetchrow;
return if !$category_full;
my ($name) = split /\//, $category_full;
return { CatUserMatch => $name };
}
this gets me the Name based on Category ID, then in the add.cgi I have:
<%cat_user_match($ID)%>
<%if CatUserMatch eq $Username%>
seems to work...