The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Clownfish::Boolean - Boolean type.

SYNOPSIS

    use Clownfish::Boolean qw( $true_singleton $false_singleton );

    my $bool = Clownfish::Boolean->singleton($truth_value);
    my $truth_value = $bool->get_value;

    if ($bool->equals($true_singleton)) {
        print "true\n";
    }

DESCRIPTION

There are only two singleton instances of this class: $true_singleton and $false_singleton which are exported on demand.

CONSTRUCTORS

singleton

    my $bool = Clownfish::Boolean->singleton($truth_value);

Return either $true_singleton or $false_singleton depending on the supplied value.

METHODS

get_value

    my $bool = $boolean->get_value();

Return the value of the Boolean.

clone

    my $result = $boolean->clone();

Return a clone of the object.

INHERITANCE

Clownfish::Boolean isa Clownfish::Obj.