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

Re: "Correct" program style questions

by sauoq (Abbot)
on Oct 23, 2002 at 02:55 UTC ( #207267=note: print w/ replies, xml ) Need Help??

in reply to "Correct" program style questions

Also, the following popular construct can generate a warning if the parameter is undefined:
my ($action) = param('action') =~ /^([[:alpha:]]+)$/;
As I don't like spurious warnings in my error log, it seems cleaner this way.

Why would you consider those warnings spurious? If they were a result of an incorrect parameter name in a form, they could help with debugging. If they are the result of someone purposefully trying to submit incorrect parameters it might be interesting to know that...

The code looks fine, by the way. I don't use POSIX character classes very often myself but I don't have any problem reading them.

"My two cents aren't worth a dime.";

Comment on Re: "Correct" program style questions
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://207267]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2015-11-28 07:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (739 votes), past polls