I’m parsing a single configuration file with both Perl and PHP, and I want to make absolutely sure that they get exactly the same result. Therefore I’d like to either export the parsed configuration to another file or (preferably) just print it (sorted alphabetically by key). Is there some simple way to do this without some ugly parsing of the $config->varlist(".") or $config->_dump() results? These both contain junk like hash() keys, some key called 1 and the values of the AppConfig configuration options like PEDANTIC.
I’m parsing a single configuration file with both Perl and PHP, and I want
Share
Ended up with the following code which works with strict, warning and taint mode: