C4::Boolean - Convenience functions to handle boolean values in the parameter table
use C4::Boolean;
In the parameter table, there are various Boolean values that variously require a 0/1, no/yes, false/true, or off/on values. This module aims to provide scripts a means to interpret these Boolean values in a consistent way which makes common sense.
if ( C4::Boolean::true_p(C4::Context->preference("insecure")) ) { ... }
Tries to interpret the passed string as a Boolean value. Returns the value if the string can be interpreted as such; otherwise an exception is thrown.
Koha Developement team <info@koha.org>