On 2004-12-15 10:27 AM, Vivek Khera wrote:
On Dec 15, 2004, at 1:11 PM, Len Weisberg wrote:
I am using TT2 for generating Apache configuration files. (This is done offline, ie before running Apache, not under mod_perl.) I can't
figure out a simple way to use any of TT2's flavors of chomp in

I do the same using tpage: tpage httpd.conf.tt > httpd.conf no special settings of any sort.

> who cares about extra blank lines in the generated file?

Well, obviously I do, or I wouldn't have asked.

only the computer will ever read that.

I didn't make myself clear. I don't just use the config on the fly in
Apache. The config file is kept around, eyeballed occasionally to check
new directives, distributed to a number of machines, used as an audit trail, etc. This could all be done without any chomping, but I'd rather not.


judicious use of [%- -%] takes care of the places where it might be important.

This time I thought I did make myself clear. I don't want something so important to require "judicious" use.

What I'm looking for is a flavor of a "chomp" option, somewhat analogous to
how CHOMP_COLLAPSE targets the specific needs of HTML.  Is it possible to
devise a CHOMP_NOJOIN option that would just do the right thing?
This is not a show-stopper for me, as my filter works fine as a workaround.
It just seems conceivable that there may be a way of doing this without
another pass over the entire output.

Thanks for thinking about this with me.

-Len

Vivek Khera, Ph.D. +1-301-869-4449 x806

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

Reply via email to