It seems that tpage has a --binmode option that sets at least the binmode for its output. Grepping the dist for "binmode" yields some other entries in Changes, and somewhere in Template::Config, but I didn't find them well-documented. Template itself lists the { binmode => 1 } option for output in ->process, but doesn't seem to tell how to do the same for input (other than reading the file yourself, and pre-munging it).
Update: I would call this a bug. The ttree program has the --binmode option, while the tpage program lacks it. Most likely you can just transplant the code from here to there.
In reply to Re: Template-Toolkit (tt2) tpage newline confusion
by Corion
in thread Template-Toolkit (tt2) tpage newline confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |