Buddy Burden wrote:

But I fear we may have drifted from the original topic, and I don't want to get too far off, given that this is a mailing list for TT2. Basically, the situation is that I have an object, which has three years worth of code built around it. It works, and it works well. I don't want to replace it, and, while I may want to change the internal implementation at some point, that doesn't really enter into the discussion at hand. I can, however, rather trivially extend it to add new functionality that doesn't impact existing code.

Given all that, is the best way to make this work with TT2 to extend it until it reaches full emulation of a hash inside TT2? or is there a better, simpler way? That's the real question I'm trying to get at.

It seems to me that TT has a single namespace at each level so you are never going to get [% blah.1.1 %] and [% blah.rowName.columnName %] to be smart enough to use the object different ways. If I were you I'd add help methods to your object that return sub-objects/tied variables that are hashish and arrayish for your various tasks. [% blah.href.rowName.columnName %] and [% blah.aref.1.1 %]


I don't see any easy way from what you've described to hack the Stash to ensure it does the right thing with an opaque interface.

--mark mills
Xodiax Engineering

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

Reply via email to