<<

NAME

C4::Boolean - Convenience function to handle boolean values in the parameter table

SYNOPSIS

  use C4::Boolean;

DESCRIPTION

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.

FUNCTIONS

true_p
    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.

AUTHOR

Koha Development Team <http://koha-community.org/>

<<