Thanks for the response .... you mention: -------------------------- The above doesn't look like a template file, so I'm not sure I'm actually answering your question, but I tried a couple of things.
1. I put the above <template></template> lines in a file named qt.tmpl, and ran the following code: -------------------------- What you placed in your qt.tmpl file is what is in my template file as well .... it's simple a .tmpl file with the content of what goes into the body of an email message. We have set things up this way so non-code people could revise the email output without touching the actual script file. Again, the template file is a "bare" text file with a .tmpl extension .... no variables/loops involved - simply there for non-programmers to access. Probably the most salient issue is the fact that the output of these templates has been fine for a long time (some well over a year, with no changes to the template file during that time), and just last week the line breaks "doubled up". My instincts tell me that this points to some sort of system change, but again, we're pretty confident there has been no changes at the system level, so I'm not sure what can be causing this event. It's really got me baffled, and about the only common denominator I can find is that the problem only occurs in email messages where the body of the message is called at the script level using HTML Template. Print statements to the email body within the script don't display this problem. It really makes no sense, but it's happening, and I'm the one that's got to fix it. And of course when I tell others that I don't have any clue what-so-ever, they kinda look at me like I must be off my medication .... At 11:41 AM 12/16/2007, Brad Baxter wrote: >On Dec 15, 2007 10:55 AM, C Hagstrom ><<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote: > >This script code: > > > ><code> > >my $template = HTML::Template->new( > > filename => "$tmpl_dir/CH_line_break_test.tmpl", > > associate => $q, > >); > >$stuff = $template->output; > > > >print MAIL $stuff; > ></code> > > > >comes through as: > > > ><output> > >########################################## > > > >=> this represents line 1 > > > >=> this represents line 2 > > > >=> this represents line 3 > > > >=> this represents line 4 > > > >=> this represents line 5 > > > >########################################## > ></output> > > > >Note: the Template file used for the above appears as: > ><template> >########################################## >=> this represents line 1 >=> this represents line 2 >=> this represents line 3 >=> this represents line 4 >=> this represents line 5 >########################################## ></template> > > > >Well, I'm a bit confused. The above doesn't look like a template file, so >I'm >not sure I'm actually answering your question, but I tried a couple of things. > >1. I put the above <template></template> lines in a file named qt.tmpl, >and ran the following code: > > 1 #!/usr/local/bin/perl > 2 > 3 use strict; > 4 use warnings; > 5 use HTML::Template; > 6 > 7 my $template = HTML::Template->new( filename => "qt.tmpl" ); > 8 my $stuff = $template->output; > 9 print $stuff; > >I got the following output: > >########################################## >=> this represents line 1 >=> this represents line 2 >=> this represents line 3 >=> this represents line 4 >=> this represents line 5 >########################################## > >(Question: is that *really* your template file contents?) > > >2. The problem you describe reminds me of the classic beef about >extra line breaks when a template is filled in. Of course, these >aren't really *extra*, because the template file contains them. For >example, when I run the following code: > > 1 #!/usr/local/bin/perl > 2 > 3 use strict; > 4 use warnings; > 5 use HTML::Template; > 6 > 7 my @array = <DATA>; > 8 my $template = HTML::Template->new( arrayref => [EMAIL PROTECTED] ); > 9 $template->param( loop => [ > 10 {line => "line1"}, > 11 {line => "line2"}, > 12 {line => "line3"}, > 13 ] ); > 14 my $stuff = $template->output; > 15 print $stuff; > 16 > 17 __DATA__ > 18 ########################################## > 19 <TMPL_LOOP name="loop"> > 20 <TMPL_VAR name="line"> > 21 </TMPL_LOOP> > 22 ########################################## > >I get the following output: > >########################################## > >line1 > >line2 > >line3 > >########################################## > >A template novice might complain that HTML::Template is adding extra >line breaks, but of course, they are right there in the template. I don't >think that you're a template novice, so again I'm not sure this is answering >your question. > >You say that nothing in your templates has changed. However, >I don't think you have given a real example of one of these templates, >so beyond my guesses above, it's hard for me to know what will help. > >Regards, > >-- Brad C. Hagstrom [EMAIL PROTECTED] ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users