in reply to Splitting a hashref into hashrefs

In my opinion, the name $hashref is not a very descriptive name. Looking at the code, I'd say that $group_info communicates more clearly the meaning of the data. You retrieve the "org" and "group" data in a single SQL statement, so like perrin says in Re: Splitting a hashref into hashrefs, the can be assumed to be related. If not, you should rethink the query, and maybe split them in two parts, after which the template can be as you want it.

If they are related, a renaming of variables can be very helpful:

my $group_info = $slashdb->sqlSelectHashref( # SELECT 'o.org_id, o.name, g.group_id, g.name', # FROM 'groups AS g, orgs AS o', # WHERE "group_id = $group_id AND o.org_id = g.org_id", );
Now, the call to slashDisplay() will be:
slashDisplay('group_edit', { group_info => $group_info });
And the template will look like:
<p>Org id: [% group_info.org_id %]</p> <p>Org name: [% group_info.org_name %]</p> <p>Group id: [% group_info.group_id %]</p> <p>Group name: [% group_info.group_name %]</p>
This way, the code remains simple, and the template is perfectly understandable.

Arjen