I've tried many things, from SQL::Statement to Parse::RecDescent. I looked at Parse::Yapp, and even considered shishi. What did those modules get me? A lot of frustration.
This afternoon, after another losing bout with Parse::RecDescent, I threw up my hands.
At that point, I went back to first principles and wrote a simple tokenizer. In goes the SQL, out comes some standardized tokens. The best part? It was easy. Regexp::Common helped with quoted strings, and I was in the home stretch. A simple state machine later, and I had a working SQL-like search tool.
Lesson: Sometimes a pre-existing modules isn't the way to go. It can overcomplicate things and make you work in the wrong direction. KISS works!
and I hope you looked at the other solutions (Score:2)
Pre-existing modules (Score:2)
I'm pretty sure it wasn't referring to the pathological case of templating modules on CPAN though. :-)
In any case, I'll try and find a citation, but it's going to be
Almost... (Score:1)