Re: [htmltmpl] Stumbled on bug with multiple tmpl_include tags on line
Brought to you by:
samtregar
From: Mathew R. <mat...@re...> - 2004-03-18 04:23:13
|
you are absolutely correct. H::T uses the line count as a way to help figure out which included file = that it is currently processiong -> without the carriage return = character it cant figure out which file it is in. Also, the design of H::T relies on using line numbers for generating = meaningful error messages. I dont see how this problem can be solved without a change in design. = Maybe it just needs a note added to the perldoc... Mathew ----- Original Message -----=20 From: "Clifton Royston" <cli...@ti...> To: <htm...@li...> Sent: Thursday, March 18, 2004 1:55 PM Subject: [htmltmpl] Stumbled on bug with multiple tmpl_include tags on = line > I probably won't be on this list too long, but wanted to pop in and > report a bug. Apparently if you have two or more <tmpl_include> tag = on > a line, the second one always bombs. Here's a fairly simplified test > file for it: >=20 > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> > <head><title>Community</title></head><body>=20 > <div align=3Dcenter style=3D"height: 100%;"><table width=3D770 = height=3D"100%"=20 > border=3D"0" cellspacing=3D"0" cellpadding=3D"0" ><tr><td> > <tmpl_include NAME=3D"../top.html"> </td></tr><tr><td> > <tmpl_include NAME=3D"../home-template.html"> </td></tr> <tr><td> > <tmpl_include NAME=3D"../bottom.html"> > </td></tr></table></div></body></html> >=20 > The three included templates in question exist in the right relative > location to the template. This template is processed properly. If = the > first & second or second & third <tmpl_include> tags are simply joined > onto the same line, it bombs with this error: >=20 > HTML::Template->new() : Cannot open included file = ../home-template.html: file not found.=20 > at /usr/local/lib/perl5/site_perl/5.6.1/HTML/Template.pm line 2180 >=20 > I ran into this immediately when I tried using the htmlclean script > (from HTML::Clean) to try to condense all our templates. This is > however the first bug I've run into in 6 to 8 months of working with > HTML::Template to build a web GUI. =20 >=20 > -- Clifton >=20 > --=20 > Clifton Royston -- cli...@ti...=20 > Tiki Technologies Lead Programmer/Software Architect > Did you ever fly a kite in bed? Did you ever walk with ten cats on = your head? > Did you ever milk this kind of cow? Well we can do it. We know = how. > If you never did, you should. These things are fun, and fun is good. > -- = Dr. Seuss >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |