Why using unlimited executable code in a config file is a bad idea: Re^2: conf file in Perl syntax.
Use a non-executable configuration, as 1nickt++ explained. If you don't like Config::Tiny, or if INI files are too simple for your configuration, consider using JSON (e.g. using JSON::XS), XML (with the help of e.g. XML::LibXML), or YAML.
All of these formats contain no executable code.
Update (2015-08-09): YAML can contain executable code. Depending on how you configure the YAML reader, parts of the configuration file may be executed. So don't use YAML until you know how to prevent the YAML reader from executing code from the YAML file.
Alexander
In reply to Re: What's the right way to include a config file as a .pm bareword?
by afoken
in thread What's the right way to include a config file as a .pm bareword?
by Cody Fendant
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |