From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of H S
Sent: Thursday, October 27, 2005 12:42 AM
To: [email protected]
Subject: [Templates] INCLUDE and passing hash as arguments

Hi,

I have  a hash passed from CGI::App to my main template which I want to pass that hash to another template.    I can't get to work.  It is ok if I pass as a scalar but not the hash.

I've got this error:
Error executing run mode 'main': undef error - Template::Stash::XS: get (arg 2) must be a scalar or listref at /dssweb/template/events/batch_monitor_main.tmpl line 26. at /dssweb/apache2/cgi-bin/events/monitor line 9

Any suggestions?  thanks, Isarin 
I suggest use dumper and look at data structures. If your 'districts' is a real hash, than no problem should occur. But it seems that districts is a blessed hashref - in this case TT would not call virtual methods on it. You may patch Template::Stash to achive desired effect.

--
Sergey Martynoff

Reply via email to