Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Expanding environment variables from ini file

by Lotus1 (Vicar)
on Aug 27, 2019 at 15:29 UTC ( #11105127=note: print w/replies, xml ) Need Help??


in reply to Re: Expanding environment variables from ini file
in thread Expanding environment variables from ini file

That is a clever and interesting approach to that problem. For my situation I am able to use a function in a module I created to set the variables in the environment at the top level script. My predecessor had the batch files read the ini over and over but I'm planning to just test to see if a key is already set before re-reading the ini file.

package custom_environment; use strict; use warnings; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( setup_modelbuild_environment ); #################################### ### Setup environment variables from the mm config file. ### sub setup_modelbuild_environment { $ENV{test_setup_vars} = "test123"; print "sub setup_modelbuild_environment : test_setup_vars = $ENV{t +est_setup_vars}\n"; } 1;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2021-01-25 17:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?