Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Env variables

by hipowls (Curate)
on Mar 22, 2008 at 05:04 UTC ( #675585=note: print w/ replies, xml ) Need Help??


in reply to Env variables

Thanks for fixing the format of your post++. As tye said it looks like Env::C is not installed but we'd need to see the full error message to be sure.

Are you sure that you need to use this module? As the documentation says

Sometimes Perl invokes modules with underlaying C APIs which rely on certain environment variables to be set, if these variables are set in Perl and the glue code doesn't worry to set them on the C level, these variables might not be seen by the C level. This module shows what really the C level sees.
Most of the time setting %ENV will be sufficient.

Some examples

$ENV{IM_ROOT} = $TC_ROOT; # set IM_ROOT $ENV{IM_DATA} |= $TC_DATA; # set IM_DATA if not already set system qw(program -switch argument); # program sees new values of IM_ +ROOT and IM_DATA { # this value of IM_DATA is only seen while this block is executing local $ENV{IM_DATA} = $TC_DATA; system qw(program -switch argument); }
These variables will be seen by any child processes spawned by your program and most modules.


Comment on Re: Env variables
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://675585]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-07-31 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls