I'm moving into my new house today (alas, rented), so I might not have 'net connection for a while. Last night, while the hotel's 'net connection was down ... again ... I started hacking on a much needed change to Class::CGI. The current version I have now delegates to CGI::Simple instead of inheriting from it. It also falls back to CGI if it cannot find CGI::Simple, but you can specify a different class to delegate to, if needed (Apache::Request, anyone?).
This should be the major thing that Class::CGI needs before it's ready for prime-time. Currently, the delegation is global rather than on a per-instance or class basis. This makes things much easier internally. Anyone see a problem with that? CGI scripts could each specify their own delegation class, but under mod_perl or other shared environment, everything must use the same delegation class (presumably Apache::Request, for mod_perl).
Side note. Running the tests while using CGI::Simple.
Class-CGI $ runtests -lQ All tests successful. Files=9, Tests=186, 3 wallclock secs ( 1.58 cusr + 0.32 csys = 1.90 CPU)
And running them while using CGI.pm.
Class-CGI $ runtests -lQ All tests successful. Files=9, Tests=186, 4 wallclock secs ( 1.98 cusr + 0.41 csys = 2.39 CPU)
Those times are very consistent. CGI is quite a bit slower than CGI::Simple, but then, you knew that, right?
I'll probably be offline for a few days and won't be able to respond to comments.
Re:CGI::Simple question
Aristotle on 2007-05-12T05:09:55
Always, unless you need the HTML generation stuff.
Re:CGI::Simple question
sigzero on 2007-05-12T13:17:34
Ah, good to know. I have never used the HTML stuff in CGI.pm as I use either TT of HT for my web work.Re:CGI::Simple question
Aristotle on 2007-05-12T14:14:12
Well, other than omitting the HTML stuff, CGI::Simple is 100% API-compatible with CGI.pm (and passes all of CGI.pm’s own relevant tests). You can use them interchangably. The only difference you’ll see is that CGI::Simple is faster.