Re: sending Apache::ASP output to a variable?
- 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: 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]
Re: sending Apache::ASP output to a variable?
Jeff Ng wrote: > > 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? > Apache::ASP was built to be a fully standalone environment, thus doing this is not easy. It would be a worthwhile extension of the environment to be able to use Apache::ASP just to render specific templates, and provide the output back to the caller, but an extension it would be, quite significant I would imagine. > Or perhaps there is a better solution using Mason? > ... also some of the other templating solutions, which were designed for this purpose. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: sending Apache::ASP output to a variable?
Hi there, On Thu, 26 Oct 2000, Jeff Ng wrote: > 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? Have a look at sub PRINT and sub PRINTF in ASP.pm, I'm sure you can do what you want there. Check out the Eagle Book if you're unsure about tied filehandles. 73, Ged.
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? Or perhaps there is a better solution using Mason? Jeff Ng Lead Web Developer onDevice Corp. [EMAIL PROTECTED]