Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-03 Thread Stephane Chazelas
On Mon, Apr 02, 2007 at 03:52:50PM -0700, Stas Bekman wrote: Stephane, you are correct in your observations that original STDIN and STDOUT filehandles are not preserved when perlio CGI mode is used. This is because how Perl works. Consider the following perl program, run from the command

conditional require of Apache::Constants, answer

2007-04-03 Thread Patrick Galbraith
Ok, I figured it out with one last suggestion from a friend: BEGIN { if (exists $ENV{MOD_PERL}) { require Apache::Constants; import Apache::Constants qw(:common :http); } } That is the ticket! Thanks to all who were to answer! Patrick -- Patrick Galbraith, Senior Programmer Grazr

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-03 Thread Stas Bekman
Stephane Chazelas wrote: On Mon, Apr 02, 2007 at 03:52:50PM -0700, Stas Bekman wrote: Stephane, you are correct in your observations that original STDIN and STDOUT filehandles are not preserved when perlio CGI mode is used. This is because how Perl works. Consider the following perl program,