I've just uploaded Class::CGI 0.10 to the CPAN and it should hit mirrors soon. I've finished implementing better error handling and while enhancements to the module are anticipated, it's essentially feature complete. However, when I put out an RFC about this module, some folks hammered me for "reinventing the wheel". After all, numerous other modules, including the excellent Data::FormValidator, solve the problem that Class::CGI attempts to solve. So why would I reinvent a wheel? After all, I've warned other people not to do that. Doesn't that make me a hypocrite?
I've reinvented this wheel for the same reason I don't have Z-Rated tires on my car. Z-Rated tires are softer and more expensive than regular tires and they don't last as long. Why on earth would someone want to buy them? It's simple: because of how Z-Rated tires are designed, they grip the road better than regular tires and are excellent for cornering at higher speeds. I don't need them on my car, but a high performance car does need them. Reinventing this wheel is necessary because the car being driven needs different behavior.
To stretch the analogy further, you wouldn't want to put a car's tires on a motorcycle. Or imagine trying to put them on a train! You can't. Even though all of the tires solve the same basic problem, they do so in different ways. It's OK to reinvent a wheel if you have a particular itch which needs to be scratched. CGI::Simple, the module upon which Class::CGI is based, is an excellent example. It passes all of CGI.pm's tests for which CGI::Simple is implementing duplicate features, it omits the HTML generating code, it's faster and it doesn't try to provide the features in both an objective and functional interface.
So when you should you not reinvent the wheel? You should probably not do this if you can't demonstrate a clear difference in what you're offering or you don't have a good understanding of the problem you're trying to solve. Sure, it's OK to do this as an exercise to better understand the problem space you're working in, but most folks who reinvent the wheel seem to do so very badly. They turn out buggy code which doesn't offer the features that well-established alternatives provide.
Class::CGI may not fit your particular needs or coding style, but it's clean, easy to use and is markedly different in approach from the alternatives (which are listed in the "See Also" section of the docs). Don't dismis the module merely because I'm offering a Z-Rated alternative to what you're currently using.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||