# fill in the template if ($args_type eq 'ARRAY') { # handle array case my @pager_list; if (defined($self->{column_names})) { my %row; my $x = 0; foreach my $col_name (@{$self->{column_names}}) { $row{"PAGER_DATA_COL_$x"} = "$col_name"; $x++; } push(@pager_list, \%row); } foreach my $rowRef (@{$self->{data}}) { my %row; my $x = 0; foreach my $value (@{$rowRef}) { $value = '' unless (defined($value)); $row{"PAGER_DATA_COL_$x"} = $value; $x++; } if ($x) { push(@pager_list, \%row); } } $template->param('PAGER_DATA_LIST', \@pager_list); } else { # handle the hash case $template->param(PAGER_DATA_LIST => $self->{data}); }