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

NAME

Data::Sofu::Undefined - A Sofu non type

DESCRIPTION

Provides a interface similar to the original SofuD (sofu.sf.net)

This Object is similar to Perl's undef .

It is nothing (not even a Data::Sofu::Value) but it is still there (in Lists or Maps for example)

Synopsis

        require Data::Sofu::Undefined;
        require Data::Sofu::Map;
        my $u = Data::Sofu::Undefined->new();
        my $map = Data::Sofu::Map->new();
        $map->setAttribute("Nx",$u);
        $map->hasMap("Nx"); # Returns 0
        $map->hasValue("Nx"); # Returns 0
        $map->hasAttribute("Nx"); # Returns 1
        # It is also there in $map->each() and $map->next();    

SYNTAX

This Module is pure OO, exports nothing

METHODS

Also look at Data::Sofu::Object for methods, cause Undefined inherits from it

new()

Creates a new Data::Sofu::Undefined and returns it

        $val = Data::Sofu::Undefined->new();

isDefined()

Returns false

stringify(LEVEL, TREE)

Returns the string representation of this Object.

Which is the string "UNDEF"

LEVEL and TREE are ignored.

binarify (TREE, BDRIVER)

Returns a binary representation of this Object. Don't call this (will be called from packBinary() and writeBinary())

BUGS

This still tests true when using:

        my $u=Data::Sofu::Undefined->new();
        if ($u) { 
                #This will happen.
        }
        if ($u->isDefined()) { 
                #This will not happen.
        }

SEE ALSO

Data::Sofu, Data::Sofu::Value, Data::Sofu::Object, Data::Sofu::Map, Data::Sofu::Value, Data::Sofu::Reference, http://sofu.sf.net