in reply to Re^2: The cost of unchecked best practices
in thread The cost of unchecked best practices
There are two changes there. One, yes, is to catch s/==/=/ by making it an error (for Perl, that error is "Can't modify constant item in scalar assignment"). The other is to add braces. This is so that later it's easy to add another line that's within the branch. Otherwise, you might have this:
if ( 5 == foo ) call_function( foo ); call_other_function( foo );
...which actually means this:
if ( 5 == foo ) { call_function( foo ); } call_other_function( foo );
|
|---|