in reply to Best way to "simulate" SSI

OK, thanks guys, but I need to refine my question a little:

I am running apache, but I'm not sure if it supports mod_perl, since I am not administrating the webserver at my university (and I think that I don't really need to know to obtain what I'm looking for).
Creating a module is something that I could do, but remember that laziness is what makes a programmer (maybe not a Perl Monk?), so my question was more something like:

What is the best way, when parsing my template html files (which contain SSI exec calls) to produce the same effect as a real SSI call, without having to change anything to the SSI scripts.

The scripts are written in Perl, of course, so I have access to the source code. Rewriting them as a module would not be a big hassle, but simplicity and ease are good virtues (wouldn't that be cool if I could redistribute my SSI scripts for somebody who wants to use them as real SSIs?).

Replies are listed 'Best First'.
RE: Re: Best way to
by KM (Priest) on Jun 27, 2000 at 18:23 UTC
    You could do the backtick way (as davorg mentioned), but if you are using mod_perl, you may want to look at Apache::SSI. This may (or may not) do what you want with minimal changes. But, if you are changing the whole way your system works (static to dynamic) you may want to not put a bandaid on it and simply redo it all the right way. What is the right way? Well, that is for you to decide. Maybe HTML::Mason is, or Embperl, etc...

    Cheers,
    KM

RE: Re: Best way to
by davorg (Chancellor) on Jun 27, 2000 at 18:12 UTC

    In that case I would be tempted just to execute tha scripts using `...` and insert the output in the approprite place.

    I can think of two potential problems with that tho'

    1. The paths to the scripts in your SSI calls will be URLs, but you'll need absolute filepaths.
    2. All of the scripts that are called from SSIs will return 'Content-type:' headers which will no longer be needed.
    --
    <http://www.dave.org.uk>

    European Perl Conference - Sept 22/24 2000
    <http://www.yapc.org/Europe/>