NAME

Data::Annotation::Expression::Builtin

SYNOPSIS

use Data::Annotation::Expression::Builtin;

DESCRIPTION

This module is not supposed to be used alone. It provides default built-ins for Data::Annotation::Expression:

  • numeric comparison operators (same as Perl)

  • string comparison operators (same as Perl)

  • boolean operators and, or, not, and xor. Note that both and and or always evaluate all their operands, mostly because the evaluation happens before the functions are called.

  • regular expression functions:

    • match/=~

    • unmatch/!~

  • set operations, applied to lists (array references) that are anyway cleaned up of duplicates:

    • union/U/⋃

    • intersection/⋂

    • less (binary, the second set is subtracted from the first)

    • symmetric_difference

    • is_superset_of/⊇

    • is_subset_of/⊆

    • is_element_of/∈

    • contains/∋

    • sets_are_same

    • set_size

    • set_is_empty

  • miscellaneous:

    • array makes sure that something is an array, turning undef into an empty array and a lonely scalar into array with that scalar inside.

    • trim removes blank chars from the beginning and end of a string.

ANYTHING ELSE (INCLUDING AUTHOR, COPYRIGHT AND LICENSE)

See documentation for Data::Annotation.