Today I broke down the CGI module into parts just to show people why they shouldn't reinvent their own version. Enough with all the talking, here is what I found.
- The CGI module is roughly 7000 lines to start with. So, to start off *snip* there goes around 3000 lines of pod. 4000 or so left.
- Around 1000 of that finds out about the OS and how to get the parameters. So *snip* 2000 left.
- Then we have the HTML generating functions, filehandle manipulators, and redirecting utilities which comes out around 1000 lines there, too. *snip* 1000 left.
- This 1000 lines deals with grabbing the parameters, the lists of parameters, encoding and decoding the parameters, uploading, and much other stuff.
- This last 1000 lines goes through 34 subroutines of parsing and other stuff.
So if you want to include 1000 lines in your program to get the parameter grabbing right, then go right ahead. For all of you others, good job for using the module.
What is probably most humorous about this is that most of the param parsing routines I see are around 1-30 lines long! When the right way is 1000 lines! I just don't get it.
Go check out
chromatic's home node for more reasons why NOT to try to reinvent this wonderful, *round* wheel :)
Almost a Perl hacker.
Dave AKA damian
I encourage you to email me