go ahead... be a heretic | |
PerlMonks |
RE: Get those parameters without CGI.pmby Ovid (Cardinal) |
on Jun 21, 2000 at 07:17 UTC ( [id://19157]=note: print w/replies, xml ) | Need Help?? |
This is an example of why the best Perl books say we should stick with Lincoln Stein's CGI module rather than try to write this ourselves.
The above code, aside from reinventing the wheel, has a variety of problems. The most immediately obvious one is the following section of code: This code is duplicated! It should be a subroutine. If you are going to reinvent the wheel, you should only do so when you are really comfortable with the language in question. Otherwise, these problems creep in and later down the road, when you're still using your reinventions, you'll come back to them and find they need to be rewritten to get around issues like this. And why are the hashes %forms and %params duplicated? The way they're created above, they are identical. I could go on, but that's enough for now. Cheers!
In Section
Code Catacombs
|
|