Please sign in to comment.
Perl does not have a 'false' keyword.
In Perl, four values are false (0, "0", "", undef). Everything else is considered true. In irssinotifier.pl, 'false' was an unquoted string, but equivalent to the quoted string 'false', which evaluates to TRUE in boolean context! Fortunately, Irssi::settings_add_bool doesn't evaluate the default value in boolean context. It first coerces the value to an integer. The string 'false' evaluates to 0 in numeric context, which in turn is false in boolean context. The same would have happened given 'true', by the way. This can all be very confusing, so let's just use the proper way of passing booleans in Perl: as 0 and 1. :) "use strict" prohibits the use of unquoted strings. It was commented, causing the mistake to go unnoticed.
- Loading branch information...