
Problems
Always have a catch-all.
If you're doing an if statement, always have an else.
If no actual need, then at least make a comment to that effect.
Can be left out if blatantly obvious, such as an if that dies.
if ( something bad ) {
die "something bad happened";
}
if ( test ) {
...
} else {
# do nothing
}
Copyright 2003, Bri Hatch of Onsight, Inc.
Presented at SPUG, 2003.
Presentation created using vim and MagicPoint.