Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: 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,
Zaxo


In reply to Re: Setup problem by Zaxo
in thread Setup problem by dvdj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found