in reply to How to create multipurpose lvalue sub such as CGI::param ?

The wonderful thing about opensource is that the source is ... well, open. Go read CGI and see what Lincoln is doing.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: How to create multipurpose lvalue sub such as CGI::param ?

Replies are listed 'Best First'.
Re^2: How to create multipurpose lvalue sub such as CGI::param ?
by chromatic (Archbishop) on Mar 22, 2008 at 18:07 UTC

    That's just cruel!

      First off, that made me laugh. :-)

      But, it also serves a few very important purposes.

      1. It's opensource for a reason. Leverage that.
      2. param() is one of the most complicated methods in CGI, for a reason - it does a gazillion things. Replicating that isn't simple and it shouldn't be seen as simple.
      3. Lincoln's code is actually quite good. It's the problemspace that sucks. Newbies could do with a worse teacher of style and readability.
      4. Client bugs suck. There's a ton of code in there to deal with browser incompatibilities. Newbies need to be smacked in the face about that, and often.

      There is method to my cruelty.


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        Lincoln's code is actually quite good.

        Except for self_or_default() which is clever but not clear in terms of interface and that hand-rolled autoloading mess (private methods are in the code segment and public methods are in the data segment) which makes debugging nearly impossible for almost everything you want.