Hi Felix,
On Tue Feb 24 17:59:16 2015, felix.ostmann@gmail.com wrote:
Show quoted text> Hello,
>
> i am using Perl & PHP in the same project and want to use the same
> configuration file.
Well, one note is that perhaps JSON or YAML or something else with a more regular syntax would be better here. However, see below.
Show quoted text> Most is working out of the box with Perl
> Config::IniFiles & PHP parse_ini_file, but there are some PHP
> specials:
>
> # PERL
> [section]
> attr=foo=bar
> attr=2
>
>
> VS
>
> # PHP
> [section]
> attr[]='foo=bar'
> attr[]=2
>
> The best way would be a extra flag to Config::IniFiles like phpcompat
> => 1 to enable some rewrites after parsing the config.
>
> Would you accept such a patch?
>
I'll accept such a patch if it is done against the tip of
https://bitbucket.org/shlomif/perl-config-inifiles/overview , passes all existing tests, contains some new tests of its own which it also passes, and documents what's going on. This sounds like a useful feature.
Note that I'd prefer this option to be "php_compat" instead of "phpcompat".
Best regards,
— Shlomi Fish