On Fri, Sep 10, 2004 at 02:11:03PM -0500, Brad Cathey wrote: > > > > you passed the array instead of the array reference > > > >> $template -> param(pagetitle => "Search Results", > >> showlist => @$allshows); > > ^^^^ > > > > this is probably the correct one: > > > > $template -> param(pagetitle => "Search Results", > > showlist => $allshows); > > Well, now I get: > > "Single reference arg to param() must be a hash-ref! You gave me a ARRAY" > > I guess I don't know how to go from @$array to $array as a ref. A Perlie > question. Maybe I need to head over to the Monastery. > > Again, the salient code is: > > my $allshows; > > push @$allshows, $sth->fetchall_arrayref({}); > > $template -> param( showlist => $allshows);
I thought this was the same thing, but try using [EMAIL PROTECTED]; maybe there is some Perl conversion rule I don't understand causing $allshows to be expanded to the array in a parameter context. For similar template loop vars I have, for instance, $template->param( "USERLIST_COL1", [EMAIL PROTECTED] ); but in this case the list was declared as an array rather than an array ref. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] Tiki Technologies Lead Programmer/Software Architect Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? Did you ever milk this kind of cow? Well we can do it. We know how. If you never did, you should. These things are fun, and fun is good. -- Dr. Seuss ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users