Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-ConfigAuto CPAN distribution.

Report information
The Basics
Id: 11345
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-ConfigAuto

People
Owner: MARKSTOS [...] cpan.org
Requestors: william [...] knowmad.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.00
Fixed in: (no value)



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
[guest - Wed Feb 2 14:07:37 2005]: Show quoted text
> 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
William, Here's a patch that updates the documentation and the code for this feature: http://mark.stosberg.com/Tech/perl/cfg-auto-fmt.patch Would you be willing to write a quick automated test for it to finish off the work? I'll release a new version with the patch if so. Mark
Subject: Specifying file format (resolved)
Show quoted text
> > http://mark.stosberg.com/Tech/perl/cfg-auto-fmt.patch > > Would you be willing to write a quick automated test for it to finish > off the work? I'll release a new version with the patch if so.
Nevermind. It was the only thing holding up a release, so I knocked it out in a few minutes. Mark