Subject: | SQL::Dialect::ANSI is not really in INI format |
Answering a question on stack overflow (http://stackoverflow.com/questions/1966716/sqlparse-how-do-i-get-a-list-with-all-reserved-words) I discovered that SQL::Dialect::ANSI is not in INI format. At least not according to Wikipedia or Config::INI. Granted the INI format isn't particularly well defined, but they all seem to agree that it's "key = value" (or key: value). I can understand why you didn't want to write out "key = 1" over and over again.
IMO there's two good solutions. 1) Give each SQL::Dialects class a method to return their config as a Perl data structure, then you can use whatever data format you like. This also makes SQL::DIalects independent of SQL::Parser.
2) Store it as a Perl data structure, unless there's some hidden purpose to storing it as an ini file. This would be best, except in order to retain backwards compatibility you'll have to rewrite get_config() as an ini writer.
IMO there's two good solutions. 1) Give each SQL::Dialects class a method to return their config as a Perl data structure, then you can use whatever data format you like. This also makes SQL::DIalects independent of SQL::Parser.
2) Store it as a Perl data structure, unless there's some hidden purpose to storing it as an ini file. This would be best, except in order to retain backwards compatibility you'll have to rewrite get_config() as an ini writer.