On Dec 24, 7:10 pm, Madhan N. [email protected] wrote:
After just a quick look I have to advise you to take look at
http://en.wikipedia.org/wiki/INI_file for ini file specification that
your IniParser should take in consideration. Specially comments, keys
outside of session, empty session in front of another session…
The second thing you should reconsider is the way we should use this
IniParser in real life.
Is it wise to parse, again, ini file for every session key that we are
supposed to read from that ini file? Just image a long ini file with
multiple sessions and lot of keys (mysql.ini, win.ini).
The best way will be to make a bunch of unit tests and usage samples.
Beside the DRY you should stick to “Eat Your Own Dog Food” principle