[Templates] wrapper in control?

Randal L. Schwartz merlyn@stonehenge.com
21 Aug 2000 08:46:37 -0700


>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:

Randal> Or do I need to punt and let PRE_PROCESS do this?  Can I set something
Randal> up in PRE_PROCESS so that it diverts output into a variable, and then
Randal> do something with that output in POST_PROCESS?  Can I tell TT not
Randal> to process the file at all after PRE_PROCESS?

OK, so I just tried this in my PRE_PROCESS wrapper:

[% capture = INCLUDE $file -%]
captured data = [% capture %]

and that worked.  But I got the data twice (and at least now I would
have gotten the META ok).

So I said, hey, isn't there a STOP directive?

So I plugged that in.

  [% capture = INCLUDE $file -%]
  captured data = [% capture %]
  [% STOP %]

Guess what?  it triggers an error!  So much for the "graceful ending"
mentioned in the manual.

So is the manual wrong, or is my brain wrong?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!