I have a perl file that want to understand certain environmental variables. So I can add:
$ENV{PLACK_ENV} = 'development'
in the code and its ok.
But is there a way to do this without touching the code?
ps: I'm working with linux
You can do this easily
$ export PLACK_ENV=development
$ perl your_script.pl
or
$ PLACK_ENV=development perl your_script.pl
export PLACK_ENV=development, all scripts and their modules you run in current shell will see this env variable. If you don't want to export this variable each time, you can just put that line to your ~/.bashrc ( as recommended above ).
.bashrcor.bash_profile.