The stupid question is the question not asked | |
PerlMonks |
Re: Setup problemby Zaxo (Archbishop) |
on Sep 05, 2004 at 14:29 UTC ( [id://388610]=note: print w/replies, xml ) | Need Help?? |
PodMaster is right to steer you away from this script, but he doesn't say why. I'll describe several of the warts on that thing. On its coding standard, this script is very primitive. It uses subroutines as a kind of simple substitution macro, taking no arguments and acting only through global variables. The subroutines occasionally return some useful value, but the caller never makes any use of the retrun values. Error handling is done with exit, which is mighty presumptious of a subroutine. It is uncatchable and prevents any more gracious message to the user. The ReadParse routine attempts to do what CGI.pm actually does for you automatically. Not taking advantage of that core module is a red flag. As it is, ReadParse does not appear to work. It seems to try to parse both raw posts and query strings in the same way -- and wrong for either.
CheckReferingURL is easily spoofed and some browsers don't accomodate it well. It is well-known that HTTP_REFERER is not useful for security or use restriction. CheckEmailAddressFormat fails for legal addresses (like dvdj@localhost). This is a notoriously difficult function to implement, and you're usually just as well off without it. Follow PodMaster's advice and try the nms archive. P.S. we spell it "Perl" or "perl". After Compline,
In Section
Seekers of Perl Wisdom
|
|