I like Config::Tiny -- it produces data not in the precise manner you're asking for, so it isn't appropriate if your requirement is fixed. But at under 28 lines, it really is tiny!
Comment on Re: .ini type file to store contents in hash of hash format