On Fri, 15 Nov 2002, Josh Chamas wrote:

> Matthew Hodgson wrote:
> > Hi,
> >
> > I have a script which executes under Apache::Registry and resides in
> > /perl/blah.pl.  However, it only generates a fragment of a page, and is
> > normally embedded into an html template using SSI with something like:
> >
> > <!--#perl sub="Apache::Include" arg="/perl/blah.pl" -->
> >
> > I am very aware that this would be better implemented as a raw perl module
> > used from apache's startup.pl (and then embedded using something like
> > <!--#perl sub="Blah" -->) - but practically this isn't an option right
> > now.
> >
>
> How about just executing this file like this:
>
>    do "$path_to/perl/blah.pl";
>

I guess that just as long as the script is never actually executed under
Apache::Registry, and if the only place it's ever do'd from is the plain
library, then this is the best solution. :)  Presumably if I needed to
execute blah.pl from many different libraries as well as actually embed it
using <!--#perl sub="Apache::Include" -->, this wouldn't be so great as
each instance of it would be compiled separately as part of that
particular block of code, thus bloating the apache process horribly.

As it happens, though, I think I can get away with only ever executing it
from one particular place. :)

thanks,

Matthew.


Reply via email to