Update Just read your question again, if the original bit below isn't what you meant, do you mean that you have a static site (that is auto generated by Perl) but your SSI isn't working anymore?

If this is the case, you need to check the file extension as most servers are configured for files ending with .shtml and not html or htm. I would experiment.

Otherwise, read below.

Original

SSI is not specific to Perl but is run by the web server itself. As such, someone has configured your server to inspect ordinary web files (html ones) to look for SSI commands (or directives) and process them.

The reason why it doesn't work in your Perl program is because the web server passes the responsibility for generating content to your program and just passes the output back to the browser. It doesn't do any post processing.

You can get around this by using one of the SSI modules available from CPAN. Here you would first generate your content using HTML::Template and then you would post process it with the SSI module.

You could also, if you have it available, use mod perl and implement some form of filter chain, where SSI happens at the end.

However, I would have thought that using HTML::Template would have given you what you needed. Why not write in what you are trying to do? We could give you some design pointers.

In reply to Re: SSI Includes inside .htm Perl Template Files by simon.proctor
in thread SSI Includes inside .htm Perl Template Files by spiderbo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.