----- Original Message -----
From: "Jeff Ng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 26, 2000 12:07 PM
Subject: sending Apache::ASP output to a variable?


> I would like to Apache::ASP to parse pages in an existing mod_perl
> environment.  Ideally, I could set headers with mod_perl, then use
> Apache::ASP to parse templates which I can arbitrarily combine.  It seems
> that using Apache::ASP forces me to do most of my coding in the perlscript
> whereas I would prefer to minimize this for the sake of not interspersing
> too much code within the HTML.
>
> As it stands, it appears that the output of Apache::ASP goes directly to
> stdout.  Is there a way to use Apache::ASP as part of a normal mod_perl
> module, then capture the output to a variable?

One thing that may not be obvious is that if you use mod_include in
apache along with mod_perl and put something like:
<!--#include virtual="/cgi-bin/perlprog.pl$PATH_INFO?$QUERY_STRING" -->
in the *.shtml file, apache will run it efficiently as a subrequest in
the same process (assuming apache is configured to run that URL under
mod_perl) and substitute the output in the page.  It isn't quite as flexible
as being able to reparse the output by a program but it does let people
who are likely to break the perl programs use them in their html pages.

   Les Mikesell
    [EMAIL PROTECTED]


Reply via email to