2008/4/29 Bruno Lalande <
bruno.lalande@gmail.com>:
Hello Darren,
I have recently proposed (and sent a first version of) a CGI
parameters parser for Boost.Program_Options.
I saw this but have been too busy to comment unfortunately.
It obviously does not
cover all what a complete CGI library can handle (it's not the goal)
but permits to retrieve parameters just the same way as you would do
with command line or config file parameters using Program_Options.
There's actually a bit in the CGI 'spec' about command-line parsing, here:
http://rfc.net/rfc3875.html#s4.4.
I was going to address that _eventually_ - it should literally take only a few extra lines of code - but if your patches were accepted I wouldn't have to, or want to since I prefer your solution. A Program_options patch should work fine in the minority cases mentioned in the link above, plus, the ability to use config files as well is very appealing (easy troubleshooting; automated testing; accurate benchmarking, anyone?). Nice idea.
And
it takes advantage of the fact that this library already has some
useful features like conversion into different data types.
FWIW, I plan to provide this kind of thing in the CGI library too.
http://lists.boost.org/Archives/boost/2008/04/135607.php
If you decide to release your CGI library into Boost, this CGI parser
for Program_Options could become a simple binding to your code,
providing a different way to easily access CGI parameters for people
who don't need more advanced features.
Sure, go for it! Besides, who knows if the CGI library will ever get up to Boost's standards?! :)