in reply to anonymous code blocks
becomesif ( ! $NONFATALERROR == 0 ) { ... }
which is reallyunless ( $NONFATALERROR == 0 ) { ... }
because any non-zero value (undef evaluates to 0 in this context) is TRUE. Using the same aurgument against unless ( ! some_test() ) as we did against if ( ! some_test() ), we then getunless ( ! $NONFATALERROR ) { ...
It's nitpicking, to be sure, but minor changes can have major benefit for anyone that has to maintain the code later, even the original author.if ( $NONFATALERROR ) { ... }
|
|---|