Steve Piner wrote:
Perrin Harkins wrote:
Chris Allen wrote:
[...]
Is $ENV{foo}='bar'; in startup.pl equivalent to PerlSetEnv foo bar
in httpd.conf?
Yes.
Are you sure? I experimented a few months ago, and found that
$ENV{foo}='bar'; would only last in each child until the
-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 1:41 AM
To: Steve Piner
Cc: Chris Allen; [EMAIL PROTECTED]
Subject: Re: When to use 'use' for accessing modules?
Steve Piner wrote:
Perrin Harkins wrote:
Chris
Is $ENV{foo}='bar'; in startup.pl equivalent to
PerlSetEnv foo bar
in httpd.conf?
Yes.
well, not exactly. PerlSetEnv sets the subprocess_env table.
as a side effect of that, you get PerlSetEnv values in %ENV
if you have PerlSetupEnv On. The other way to look at it
I have a modperl site that accesses a number of modules.
In my startup.pl I have:
#!/usr/bin/perl -w
use strict;
use lib('/path/to/my/installation'); # 'site' directory is here
use Apache::DBI;
use Apache::StatINC;
use site::customers;
use site::orders;
use site::products;
use site::base;
1;
Chris Allen wrote:
If site::products calls functions from site::customers, do I need
a 'use site::customers' in site::products, when I have already
done a 'use' in my startup.pl?
No, but I always do. It's good documentation, to remind you that if you
ever ran this code outside of mod_perl
Perrin Harkins wrote:
Chris Allen wrote:
[...]
Is $ENV{foo}='bar'; in startup.pl equivalent to PerlSetEnv foo bar
in httpd.conf?
Yes.
Are you sure? I experimented a few months ago, and found that
$ENV{foo}='bar'; would only last in each child until the first request
of the child