in reply to Properties files to read the tokes and passwords outside of the perl scripts.
There are lots of different ways to do this. JSON, YAML, XML, INI (simpler), .properties as mentioned by salva, even Perl (/shameless plug), and many more (see e.g. the Config:: namespace on CPAN). As for locating the files in the filesystem, there's also lots of ways to do this. Hardcoded paths (e.g. in /etc or perhaps /usr/local/etc), paths relative to the script's location via FindBin plus File::Spec or e.g. Path::Class for filename manipulations, having the config in the user's $HOME ($ENV{HOME} in Perl), in Windows via the registry, passing the config filename on the command line or in an environment variable, something as simple as the current working directory, or for example if you're running inside Docker, Docker secrets.
Update: Expanded the lists above a little bit.
|
|---|