On Wed, 17 Sep 2003 16:38:27 -0400
Ivan Adzhubey <[EMAIL PROTECTED]> wrote:

> Tried push(), unshift() and unique(), none works. TT 2.10, perl 5.8.1.
> Is it a known problem or is it something wrong with my setup? Even
> cut'n'pasted examples from the documentation but no go. No error
> messages just all methods always return undef.

Ok, I found wat was the problem with my code. Virtual methods won't work
on variables that did not exist prior to calling them. So you can't
create a brand new list by saying just:

[% mylist.push('X') %]

You need to use something like this:

[% mylist = [];
   mylist.push('X')
%]

Should be documented somewhere I beleive.

-- 
Ivan

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to