Subject: | Specifying file format |
Hey Mark,
I'm in need of having a way to specify the file format with Config::Auto as it does a poor job of guessing. In my case, I cannot add the #! to the top of the file (long story short, it's an auto-generated file which gets other stuff put at the top).
At first, I thought this would be an easy patch and work much like Config::Auto's parse command does. Upon further inspection, I see that you allow for multiple config files to be parsed. Each one could potentially have its own format which further complicates defining the config format for a file.
A quick fix would be to define an attribute that specifies the format to use, e.g., cfg_format. This would require all files to use the same format (not a problem for me since I only have 1 file that is incorrectly being parsed). I suppose this attribute could also be written to accept an array to allow it to map the config format to each file. (What would happen if this attribute is shorter than the list of files?) What do you think?
William