http://qs321.pair.com?node_id=675585


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.