=head1 NAME ODF::lpOD::Common - Common utilities provided by the Perl lpOD library =head1 DESCRIPTION This manual page describes miscellaneous functions and auxiliary features of the lpOD Perl implementation that are not directly linked to the lpOD functional specification. =head1 Data conversion and type checking utilities The utilities introduced in this section are implemented as exported functions. They may be used without package or object reference. =head3 is_true(value), Returns C if the given value may be regarded as true (in the Perl lpOD implementation). The usual Perl true values are interpreted as C, with the a few exceptions. The strings C<'false'>, C<'no'>, and C<'off'>, like 0, C, and the empty string, are regarded as C. The common constants C and C (corresponding to 1 and 0) may be used by the applications. =head3 is_false(value) Returns C if the given value is C, zero, an empty string, C<'false'>, C<'no'>, C<'off'>. Returns C otherwise. =head3 odf_boolean(value) Translates in an ODF-compliant boolean value (i.e. C<'true'> or C<'false'>) a Perl/lpOD boolean value. The result may be used as the value of any ODF boolean attribute. =head3 is_odf_datatype(type) Returns C if the given argument is the name of a valid ODF data type for table cells or variable fields, C otherwise. For example, the first instruction below returns C and the second one returns C: $check1 = is_odf_datatype('float'); $check2 = is_odf_datatype('complexType'); =head3 odf_value(value, type) Converts the given value according to the given type (which must be a regular ODF data type), and checks it if the value is already in ODF format. The following example formats the current system date so the result may be used as the value of a date field in a document: $odf_date = odf_value(time(), 'date'); This function returns C if the given value is not compatible with the given type. I =head3 iso_date(time) Translates a numeric C