Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

(Ovid - let's look at this again) Re: RFC refactoring

by Ovid (Cardinal)
on Feb 15, 2002 at 22:06 UTC ( #145776=note: print w/replies, xml ) Need Help??

in reply to RFC refactoring

I'm reading through a lot of these posts and I'm a little disheartened. Let's face it, tachyon isn't exactly coming to us with a 10 line CGI parsing routine and saying "should I upload to CPAN?". He asked for some feedback and in my mind, that translates to a code review, but many appear to object without reviewing the code! There was some limited support for this, but again, without apparently reviewing the code. is a wonderful "don't leave /home without it" sort of module. However, it does have some significant issues that warrant competition. CGI::Lite seems to be well-regarded as is Apache::Request. Is that it, though? Is this all that we allow in the club? CGI::Simple seems to be a promising way of overcoming many of the typical "I won't use" objections.

A while ago, tachyon and I were talking about this and I reviewed his code. While I made a couple of suggestions, for the most part, I liked what I saw. What really impresses me about this effort is that, with just under 1000 unit tests (going by what tachyon said), he states that this module passes 100% of the tests. Note that these include all of the tests. So, if the test suite is complete, we have 100% backwards compatibility with a lightweight, well-written module. I think that's something to consider.

Yeah, we can say that "" works, don't use anything else, but what does that get us? Stagnation. Let's try new things. Let's experiment. Even if this code offered no advantages other than much cleaner internals, it should be worth considering on that basis alone, not just dismissed out of hand, as some here seem to have done.

This isn't to say that we all need to rush forward and embrace what tachyon has done, but I think we should give it more consideration that what has been done here. Let's look at the features:

  • 100% backwards compatible to for the functions it chooses to implement.
  • strict and warnings compliant.
  • Faster during runtime (this, of course, would be a spurious benefit if it didn't live up to its other claims).
  • Possibly faster compilation time (useful in a straight CGI environment).

Now, if you have to have those HTML generating functions, don't use CGI::Simple. Frankly, I use those HTML generating functions if I'm doing something really, really minor. Otherwise, though, I use templates. If I use templates, CGI::Simple perfectly fits my needs. If this gets to the CPAN, I'm really going to give this module some serious consideration.


Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

  • Comment on (Ovid - let's look at this again) Re: RFC refactoring

Replies are listed 'Best First'.
Re: (Ovid - let's look at this again) Re: RFC refactoring
by tachyon (Chancellor) on Feb 16, 2002 at 00:21 UTC

    Thanks for your post Ovid As it happens I have posted the relevant benchmarks at CGI::Simple vs - Is twice as fast good enough? The title is self explanatory but the actual results are interesting. You may not have realised how much of a performance penalty use strict; applies for instance.




      Read about module the bugs. These bugs should be fixed:

      Best regards,

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://145776]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2021-10-25 07:00 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.