Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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.

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


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-07-30 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (240 votes), past polls