SOLVED: How to access base environment from Perl sections
Perhaps it's obvious but after years of mod_perl, I was blocked, probably because using this basic Perl ability is frowned upon in mod_perl due to performance issues. Of course, during startup, performance isn't an issue. :-) In my case, I wanted to PerlPassEnv all environment variables that began with EWINGZ_ Perl for ( grep { /^EWINGZ_/ } `env` ) { my ($key) = /^([^=]+)/; push PerlPassEnv,$key; } /Perl Stas: I asked this question almost exactly a year ago and nobody answered it. I asked it yesterday, and again nobody answered it. Perhaps this should be the Perl Sections section of the guide? After all, the guide already mentions something very similar to this. -- -- Tom Mornini -- InfoMania Printing and Prepress -- -- ICQ: 113526784, AOL, Yahoo, MSN and Jabber: tmornini
Re: SOLVED: How to access base environment from Perl sections
Tom Mornini wrote: Perhaps it's obvious but after years of mod_perl, I was blocked, probably because using this basic Perl ability is frowned upon in mod_perl due to performance issues. Of course, during startup, performance isn't an issue. :-) In my case, I wanted to PerlPassEnv all environment variables that began with EWINGZ_ Perl for ( grep { /^EWINGZ_/ } `env` ) { my ($key) = /^([^=]+)/; push @PerlPassEnv,$key; } /Perl Stas: I asked this question almost exactly a year ago and nobody answered it. I asked it yesterday, and again nobody answered it. Perhaps this should be the Perl Sections section of the guide? After all, the guide already mentions something very similar to this. Funny, but there are too many things in the guide to remember. The new search feature exposes them all, just remember to use it. I was just about to add your tip, when I've found it http://perl.apache.org/docs/1.0/guide/porting.html#Passing_ENV_variables_to_CGI which was added about 3 years ago: http://perl.apache.org/docs/1.0/guide/Changes.html#05_17_1999_ver_1_11 may be we need to add a xref from the Perl sections section? __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: SOLVED: How to access base environment from Perl sections
On Thursday, August 15, 2002, at 07:47 PM, Stas Bekman wrote: Tom Mornini wrote: Perhaps it's obvious but after years of mod_perl, I was blocked, probably because using this basic Perl ability is frowned upon in mod_perl due to performance issues. Of course, during startup, performance isn't an issue. :-) In my case, I wanted to PerlPassEnv all environment variables that began with EWINGZ_ Perl for ( grep { /^EWINGZ_/ } `env` ) { my ($key) = /^([^=]+)/; push PerlPassEnv,$key; } /Perl Stas: I asked this question almost exactly a year ago and nobody answered it. I asked it yesterday, and again nobody answered it. Perhaps this should be the Perl Sections section of the guide? After all, the guide already mentions something very similar to this. Funny, but there are too many things in the guide to remember. The new search feature exposes them all, just remember to use it. I was just about to add your tip, when I've found it http://perl.apache.org/docs/1.0/guide/porting.html#Passing_ENV_variables_to_CGI which was added about 3 years ago: http://perl.apache.org/docs/1.0/guide/Changes.html#05_17_1999_ver_1_11 may be we need to add a xref from the Perl sections section? Yes, that makes sense. I would NEVER have looked there, as: 1) It wasn't in the Perl or Configuration section 2) I wasn't trying to pass environment variables to CGI scripts. :-) I'll have to learn to use the search functionality! I'm not sure if I've said it before, but thanks for doing all that you do for the mod_perl community. I appreciate it. -- -- Tom Mornini -- InfoMania Printing and Prepress -- -- ICQ: 113526784, AOL, Yahoo, MSN and Jabber: tmornini