perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: passing through an existing foo.pm from xs
Date Fri, 14 Dec 2001 07:25:47 GMT
On Fri, 14 Dec 2001, Stas Bekman wrote:
 
> I see what you mean. A module APR::Foo can be used outside of Apache if 
> it doesn't use any ap_ functins. But for example $r->subprocess_env 
> needs $r, which is Apache::Request. Doesn't it tie the module to Apache? 

huh?  no.

> Otherwise how do you get subprocess_env?

my $table = $r->subprocess_env;

APR::foo($table);

where the C prototype underneath APR::foo is:
void apr_foo(apr_table_t *table);

outside of httpd:

my $pool = APR::Pool->new;
my $table = APR::Table::make($pool, 10);

while (my($key,$val) = each %ENV) {
    $table->set($key, $val);
}

APR::foo($table);

if that doesn't help or make sense, give me more context.  what is the C
prototype of the function that needs r->subprocess_env?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message