vasundhar has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: SSI usage in CGI scripts
by davorg (Chancellor) on Jul 13, 2006 at 13:06 UTC

    Please read How do I post a question effectively?. The clearer you make your question, the more replies you'll get.

    It's unclear whether you're asking about CGI programs or static HTML pages. Your question mentions both. If you're talking about HTML pages then your question is off-topic for a Perl web site. If you're talking about CGI programs then you need to give more detail before we can give a reasonable answer. What, exactly, are you trying to do?

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: SSI usage in CGI scripts
by jdtoronto (Prior) on Jul 13, 2006 at 14:38 UTC
    Yes, you would do well to consider davorg's remarks.

    SSI can call CGI scripts, that should be in the SSI documentation. There is also CGI::SSI which allows you to use SSI form within a CGI script, I have never used it.

    If you are seriously writing CGI based applications then I believe you would be better off keeping things within the CGI rather than using a mixture. If you can do it in SSI then you can do it much more flexibly in CGI.

    jdtoronto

Re: SSI usage in CGI scripts
by jhourcle (Prior) on Jul 13, 2006 at 14:43 UTC

    I'm not aware of any servers that have configurations that will process pages created through CGI for SSI.

    It's a mutually exclusive situation -- you can use SSIs, CGI, or some other text processing engine (ColdFusion, PHP in non-CGI mode, etc.)

    And then we get to the exceptions -- it is possible through mod_perl to define your own handlers. It may be possible to throw something back to the SSI processor, but I've never attempted such a thing, and wouldn't really know where to start.

    As another possibility, rather than using CGI, you could use embperl, and there is a handler to mix the two. (I don't know what order they're called, so if the embperl can emit an SSI instruction to be processed by the SSI engine)