There's a new test for the case too.

--- JIT/Base.pm Wed Jun  9 15:31:15 2004
+++ JIT/Base.pm Wed Jun  9 15:34:32 2004
@@ -75,7 +75,7 @@
 
   foreach my $row (@$array) {
     croak("Bad param settings - found non hash-ref for loop row in loop $loop_name!")
-      unless ref $row eq 'HASH';
+      unless ref $row && UNIVERSAL::isa($row, 'HASH');
     
     my $lc_name;
     foreach my $name (keys %$row) {


--- t/03loops.t Wed Jun  9 15:57:13 2004
+++ t/03loops.t Wed Jun  9 16:00:15 2004
@@ -1,4 +1,4 @@
-use Test::More tests => 8;
+use Test::More tests => 9;
 use HTML::Template::JIT;
 
 my $debug = 0;
@@ -69,3 +69,13 @@
 like($output, qr/Apples, Oranges, Brains, Toes, and Kiwi./);
 like($output, qr/pingpongpingpongpingpong/);
 
+$template = HTML::Template::JIT->new(filename => 'loop.tmpl',
+                                    path => ['t/templates'],
+                                    jit_path => 't/jit_path',
+                                    jit_debug => $debug,
+                                   );
+$template->param(foo => "FOO");
+$template->param(bar => [ bless({ val => 'foo' }, 'barfoo'),
+    bless({ val => 'bar' }, 'barbar') ]);
+$output = $template->output();
+like($output, qr/bar: foo,bar,/);

-- 
Alex Kapranoff.


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to