in reply to A template module question

First, I would caution against reinventing the wheel; I know of at least 3 good templating packages out there, Text::Template, HTML::Template, and Template Toolkit 2. Of course, this might be legacy code and you're stuck with it, which is fine.

Since you only have about 5 print statements in this, and located in only a few subroutings, why not add a filehandle param to each of these? You can locally set the filehandle for each inside the subs, of if null, grab STDOUT. This way, the code remains portable, and there doesn't seem to be a lot more work than it looks like.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain