People all over the globe are using this piece of (imnsho) ugly code in production, and the module has proven to be very stable and capable.
Let me stress the last part of Juerd's sentence. CGI.pm has been extensively tested, and is very solid. It also has a huge install base and chances are most people will have easy access to it. This is why I recommend it to new monks over creating their own buggy parsers. Those who would tell people who may be new to Perl that it's 'ugly code' are not acting responsibly. This is especially the case when they don't suggest a better alternative thereby leading some to believe that rolling their own isn't such a bad idea.
As for your concerns with using CGI.pm in production software, are they licensing related? If so CGI.pm is licensed under the same terms as Perl, from the docs:
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
I'm not a lawyer, but this would lead me to believe that there are no problems with using CGI.pm in (presumably closed source) production software. Check out the Artistic license for more information.