Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I hope I'll be forgiven for having one last try... :^)

  1. If you are paranoid about it, then include code that explicitly checks whether the value returned by param() is defined.
    1. I don't consider it paranoid to validate user input. This is no different that the whole purpose of taint checking.
    2. This goes back to what I said a couple of iterations back. Using the || operator (which is undeprecated as far as I know ) serves the purpose of simplifying and clarifying the code, and removing the need to used defined twice (or more) on each parameter.
    3. What's wrong with cleaner, simpler code?
  2. If you aren't paranoid about it, then don't write any specific handling for it and let perl spew out some warnings.

    Sounds like a possible DoS attack in the making.

    Whilst I've never heard of it being done in this particular way--and my attempts at seeing what would happen on my local Apache server where foiled by simply not being able to generate enough queries fast enough as the user agent and the webserver were always competing for cpu and were therefore self limiting--but it wouldn't be the first time that causing logs to fill/overflow or simply sapping the horsepower of the server by causing it to generate gobs of useless warnings has been used to bend or break a server.

  3. If you don't care at all, turn off warnings.

    That is probably what I would do, locally, for the duration of the untaining of the parameters and validation that I had them all.

Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!

In reply to Re: Re: Re: Re: Re: Re: Re: Re: "Correct" program style questions by BrowserUk
in thread "Correct" program style questions by Ovid

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (4)
    As of 2018-10-24 03:10 GMT
    Find Nodes?
      Voting Booth?
      When I need money for a bigger acquisition, I usually ...

      Results (127 votes). Check out past polls.