![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: What's the right way to include a config file as a .pm bareword?by afoken (Chancellor) |
on Aug 07, 2015 at 18:05 UTC ( #1137870=note: print w/replies, xml ) | Need Help?? |
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) 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
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|