Aaron Johnson ([EMAIL PROTECTED]) said something to this effect:
> I was thinking about the same thing awhile back.  It was interesting to me that
> lots of neat applications are PHP based.  I would like to be able to take the
> processed PHP page and include it inside of my mod_perl page.  I was thinking
> there are several ways I could handle.  I can have a seperate directory that
> process the php files and just use the LWP::Simple to get the page as a
> processed string.  Then replace any content with =~ s/blah/cool/ inside of the
> mod_perl processed page.  I do this with some cgi programs that I use
> currently.  It works ok, but the overhead must be tremendous.  Anybody else done
> anything similar?

Why not use a subrequest?

Get your content, generate the URI. Call:

my $subr = $r->lookup_uri($uri);
$subr->run;

And your subrequest (be it a mod_perl page, PHP, cgi, or static HTML) get
executed in the place where you call $subr->run.

Apache itself does tons of subrequests. mod_autoindex, for example.

And, actually, using LWP::Simple isn't that much extra overhead, provided it
already loaded and all that. Although I'd use LWP::UserAgent, not LWP::Simple.

(darren)

-- 
"The bad reputation UNIX has gotten is totally undeserved, laid on by people
who don't understand, who have not gotten in there and tried anything."
    -- Jim Joyce, owner of Jim Joyce's UNIX Bookstore

Reply via email to