Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: .env loading the dot env file?

by szabgab (Priest)
on Mar 28, 2021 at 09:24 UTC ( #11130503=note: print w/replies, xml ) Need Help??


in reply to Re: .env loading the dot env file?
in thread .env loading the dot env file?

I think in the cases I saw this, the .env file was more like an INI file without any sections and certainly without any shell-like executions. Just plain key-value pairs. I am not sure even quotes are needed. However splitting to only 2 values should be used so the value part could contain an equal sign as well. Better yet, use your suggestion.

I am still wondering how much is this a "standard practice" or a good practice?

Replies are listed 'Best First'.
Re^3: .env loading the dot env file?
by perlfan (Vicar) on Mar 28, 2021 at 18:35 UTC
    It is definitely not "best practice" to parse config files of any format that is not your own in an ad hoc way. It's a last resource if you can't figure out the format or proper way to use it for affecting your environment externally to your Perl program; that said, if you have to do it you have to do it. Try not to, though.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2022-08-14 01:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?