Use file includes.  virtual includes are meant to execute
anything and include its output, and is handles by Apache::SSI
outside of Apache::ASP. File includes will be executed as perl 
asp subroutines in the same perl namespace as the 
including script.

-- Joshua
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Philip Mak wrote:
> 
> Hello,
> 
> I have stumbled upon an issue with Apache::ASP <!--#include virtual-->
> directive. Included files do not seem to be able to access the same scope
> of variables. I am using the following test program:
> 
> File 1.inc:
> 
> <!--#include virtual="2.inc"-->
> <% $test .= '1'; %>
> <p>$test = <%=$test%></p>
> 
> File 2.inc:
> 
> <% $test = '2'; %>
> 
> One would expect the output to be "$test = 21", but it comes out as
> "$test = 1". I have tried the same thing with #include file instead of
> #include virtual and the result is correct.
> 
> I am using Apache/1.3.9 on Red Hat Linux. My httpd.conf is setup for ASP
> as follows:
> 
> <Files ~ (\.inc)>
>         SetHandler perl-script
>         PerlSetVar Global /tmp
>         PerlSetVar Filter On
>         PerlHandler Apache::ASP Apache::SSI
> </Files>
> 
> Does anyone know if this is a bug, or a feature, or did I perhaps setup
> ASP incorrectly? Is there a good workaround for this? (It is inconvenient
> for me to use #include file instead since I need to include files relevant
> to DOCUMENT_ROOT, as well as relevant to the location of the current file,
> but I could use that as a last resort.)
> 
> Thanks,
> 
> -Philip Mak ([EMAIL PROTECTED])

Reply via email to