LPM: Text::Template and server-side includes in HTML files
fprice at mis.net
Wed Aug 30 17:49:02 CDT 2000
On Wed, Aug 30, 2000 at 05:34:41PM -0400, Gregg Casillo wrote:
> I've come up against this problem more and more recently: I use
> Text::Template to plug some data into an HTML page and spit it out to
> the browser. However, the static HTML page has several server-side
> includes (and sometimes these includes have more includes nested within
> them) in it which Text::Template does not seem to handle.
> Does anyone who uses Text::Template know of a way around this without
> getting rid of the server-side includes?
I thought CGI-generated pages couldn't use SSIs as such b/c the page
went directly to the browser without the httpd ever seeing it. So the
web server never has a chance to expand the include. Or at least
that's the rationale I dreamed up when I could never make it work.
I've done my own cheap SSIs like this (from within the perl script):
print $_ while (<SSI>);
Would be interested to know if you find a better way...
Frank Price | fprice at mis.net | www.sxse.org/fprice/
GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix
More information about the Lexington-pm