[Webtek-devel] bug in foreach
Status: Alpha
Brought to you by:
prozessor13
From: Adrian S. <adr...@gm...> - 2008-06-15 11:56:08
|
I just searched for ages for this bug! <% foreach list="...." iterator="xyz" do~q{ <% a_macro param="<% xyz %>" %> } %> This doesn't work, producing the error: macro_error : MyApp::Page::MyPage=HASH(0x227f904) has no macro 'xyz' If I implement the following method in class Xyz: sub self :Macro { my $self = shift; return $self; } and then put the following in the template: <% foreach list="...." iterator="xyz" do~q{ <% a_macro param="<% xyz.self %>" %> } %> Then it works fine |