perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew O'Brien" <>
Subject RE: Execute() and App objects
Date Thu, 02 Apr 2009 22:19:24 GMT

Hi Doug,

> From within one request, I'm trying to Execute() an HTML 
> template from 
> another part of the application.  That template is dependent 
> on App object 
> methods defined in the that is in the same directory 
> as the HTML 
> template.  However, the Execute() seems to use the Req and 
> App objects from 
> the calling context.  That App object does not have the 
> appropriate methods 
> defined, and I'd prefer not to have to copy them there, of 
> find some other 
> way to share them between the two App objects.
> Does anyone have any ideas on how to make this Execute() 
> behave as what I 
> would call a 'first class request'?  In other words, get it 
> to load and use 
> the that is associated with the target HTML template?

Haven't used it recently but the subrequest process is probably what
you're after:

"When running Embperl with Apache 2.0 there are some extented
possibilities. While Apache 1.x has send all it's ouput directly to the
browser, Apache 2.0 introduces a concept of filters, which allows to
process the output of any Apache handler through a chain of filters.
Embperl can use this to embed any output that Apache can generate as a
Embperl::Object component, just like it is any native Embperl page. This
can be done by using the subreq parameter:

    [- Execute ({subreq=>'/cgi-bin/script.cgi'}) -]

The above code includes the output of a cgi script into a page."



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message