perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@elastica.com
Subject Re: Confused about variable scope.
Date Tue, 01 Aug 2006 23:06:35 GMT
The approach I'm using is the suggested approach in the mod perl book.

Basically setup the environment in order to pass information to apache so that
it's available in httpd.conf and then in httpd.conf to use mod perl to
interrogate %ENV. One problem is that mod_perl clears out %ENV so what you see
below is a way to repopulate it after that has happened.

Quoting Jonathan Vanasco <jon@2xlp.com>:

> 
> On Aug 1, 2006, at 4:38 PM, robert@elastica.com wrote:
> >         for (`env`) {
> > 	 next unless /^X_/;
> > 	 /(.*)=(.*)/;
> > 	 $ENV{$1} = $2;
> > 	 push @PassEnv, $1;
> > 	 #print "$_\n";
> > 	}
> >
> > and I then do
> >
> >         my $somevariable = $ENV{'X_KEY'};
> 
> my question is what exactly are you trying to do?  this sounds like a  
> really assbackwards way to do what you really want done.
> 




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Mime
View raw message