Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: .env loading the dot env file? -- module

by Discipulus (Canon)
on Mar 28, 2021 at 12:44 UTC ( [id://11130509]=note: print w/replies, xml ) Need Help??


in reply to .env loading the dot env file?

Hello szabgab,

just once we play vice versa: I write and you read ;)

I dont know this being a standard, nor I know if it is wise.. but why dont use directly perl instead?

Adapting my Modules as configuration files you can have ( in modconfenv.pm ):

use strict; use warnings; $ENV{XX} = 42; $ENV{YY} = 'whatever you wont'; unshift @ARGV,$_ for reverse map {s/\s*#.*$|^\s*#.*$//; (split ' ',$_,2)} split /\n/, <<'EOCONF' --put here your --list of arguments and #any #indented --comment #comments --too EOCONF ; print "@ARGV" unless caller; 1;

and then just perl -Mmodconfenv -e "print qq($ENV{XX} $ENV{YY})"

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found