Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl
difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ?
 

Index | Next | Previous | View Flat


ckatz at cfa

Mar 26, 2012, 11:43 AM


Views: 722
Permalink
difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ?

Hi,

My web app uses the PGPLOT module to access PGPLOT, which is a scientific
plotting library commonly used in my field. It is a Fortran library, with
a C wrapper around it, which is then wrapped in Perl. This works fine in
my test scripts, producing the desired graphics.

The library requires that the environment variable PGPLOT_DIR be set so it
can find some required files. Running from the command line, I just set
this in the shell, and PGPLOT works fine. Running in Apache, I see
different behavior:

When I set this in httpd.conf:
PerlSetEnv PGPLOT_DIR /my/pgplot/directory
my Perl programs can see the value in $ENV{PGPLOT_DIR}, but the PGPLOT
library can't, and my code fails.

When I set this in httpd.conf:
<Perl>
$ENV{PGPLOT_DIR} = q[/my/pgplot/directory];
</Perl>
my Perl programs can't see the value in $ENV, but the PGPLOT library can,
and my code works.


Can someone help me understand what the difference is between these two
cases?

Is the situation muddled because the PGPLOT library is a
Perl-wrapped-C-wrapped-Fortran library? I'm not sure how the environment
passing is supposed to work.

Regards,
Charlie

Subject User Time
difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? ckatz at cfa Mar 26, 2012, 11:43 AM
    Re: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? randolf at modperl Mar 26, 2012, 11:54 AM
        Re: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? ckatz at cfa Mar 26, 2012, 12:25 PM
    RE: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? Edward.Szekeres at PERKINELMER Mar 26, 2012, 11:55 AM
    RE: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? lloyd at protectchildren Mar 26, 2012, 12:30 PM
    Re: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? ckatz at cfa Mar 27, 2012, 9:48 AM
    Re: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? torsten.foertsch at gmx Mar 27, 2012, 10:53 AM
        Re: difference between PerlSetEnv and <Perl>$ENV{}=</Perl> ? ckatz at cfa Mar 28, 2012, 11:39 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.