Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: "Correct" program style questions

by sauoq (Abbot)
on Oct 23, 2002 at 02:55 UTC ( [id://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.";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (11)
As of 2024-04-23 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found