Perldata Scalar values:
https://perldoc.perl.org/perldata#Scalar-values
says:
A scalar value is interpreted as FALSE in the Boolean sense if it is undefined, the null string or the number 0 (or its string equivalent, "0"), and TRUE if it is anything else.
mysqltuner.pl is littered with phrases like these:
- default => '0',
- if ( $var eq "" )
- if ( $var eq '' )
- if ( $var ne "" )
- if ( $var ne '' )
- if ( ( $var // '0' ) eq '0' )
- if ( ( $var // '0' ) ne '0' )
- if ( ( $var || "" ) eq "" )
To follow standard Perl practice, they should be simplified to:
- default => undef,
- if ( !$var )
- if ( !$var )
- if ($var)
- if ($var)
- if ( !$var )
- if ($var)
- if ( !$var )
Perldata Scalar values:
https://perldoc.perl.org/perldata#Scalar-values
says:
mysqltuner.pl is littered with phrases like these:
To follow standard Perl practice, they should be simplified to: