perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wittkoski" <johnwittko...@aol.com>
Subject Re: [mp1] subprocess_env and non-mod_perl handlers
Date Tue, 04 May 2004 14:33:29 GMT


Geoffrey Young wrote on 5/3/04, 8:02 PM:

 > > If I do the void subprocess_env trick:
 > >
 > > $r->subprocess()
 > >
 > > before retrieving $something, then it's populated along with the
 > rest of
 > > the environment.
 >
 > that only affects %ENV, not the ability of $r->subprocess_env to grab
 > something from the subprocess_env table.  %ENV is not automatically
 > populated with the contents of subprocess_env, so if you're really
 > talking
 > about %ENV then your Example 2 + subprocess_env() trick sounds right.


Nope, I'm talking about the table itself (via subprocess_env), which is 
why I am confused.


 >
 > >
 > > However, as mentioned in many of the docs/books, this is expensive
 > and I
 > > really only need the one variable.
 > >
 > > I've also tried walking the subprocess_env table in the perl handler,
 > > but the value set in the C handler is not there.
 >
 > that's really strange.  are you sure that you are not removing it in your
 > application someplace?  try tweaking the test tarball I mentioned bit
 > by bit
 > until it has the relevant logic from your code in it.  I can't tell
 > you the
 > number of bugs I've "fixed" by trying to reproduce the bug, only to
 > find I
 > was the bug :)


Understood. :-) Thanks for the code, I'll keep working on it trying to 
narrow down the problem. At least I know that the behavior I'm seeing is 
definitely wrong and it should work without the void subprocess_env call.


 >
 > >
 > > Are the C API subprocess_env table and the mod_perl API subprocess_env
 > > table distict until something (like the void call) merges the
 > tables? Is
 > > this some sort of scoping issue between C and Perl?
 >
 > it shouldn't be, so long as you're hitting the tables directly with
 > $r->subprocess_env.  %ENV is another matter entirely.


Thanks,

    --John





-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message