[ic] ITL functions
mike at perusion.com
Fri Sep 16 01:21:31 EDT 2005
Quoting Daniel Browning (db at kavod.com):
> * jeff at hisgirlfridays.com <jeff at hisgirlfridays.com> [2005-09-15 17:39]:
> > Hello,
> > I am just finishing up an experimental project of sorts. To complete my latest IC
> > project, I determined that I was not going to use any of Foundation, and furthermore, I
> > was going to use ITL as much as possible.
> > As the project comes to a close, I'd say it worked damn well, with the exception of one
> > thing. I don't know how to do a function that contains ITL. For example, I found
> > that I cut-and-pasted large blocks of ITL in numerous places. Now I should refactor those
> > blocks into function calls, but usertags consist of perl, not ITL. I might be able to
> > make a generic usertag wrapper that called functions via include or some other kludgy
> > mechanism, but before I go off on a ridiculous tangent I was curious as to how some of the
> > experts here might address this.
> I think that it would be very nice to have a simple, elegant argument
> passing scheme for ITL. It would be useful even for short, simple
> ITL snippets that aren't ready to become perl code yet. Something like a
> redesigned [component].
> Throwing out some ideas...
> [call-itl fn=foo a=1 b=2]
> * Sets up special environment variables, accessible via [arg a], [arg b]
> (or scratch vars if we don't want to start a new namespace.)
> * Does an [include] itl_lib/<function>.itl (foo.itl in this case) (with
> interpolation of argument variables as above) -- or maybe an
> It would probably be difficult to get the order of interpolation just right.
No, not back to the days of [[tag]]!
There used to be such an animal, a [with ...] [/with] tag. But trust me,
Perl is a better way. 8-)
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
I am a great believer in luck, and I find that the harder I work
the more luck I have. -- Thomas Jefferson
More information about the interchange-users