NAME

Data::Object::Undef - An Undef Object for Perl 5

VERSION

version 0.27

SYNOPSIS

use Data::Object::Undef;

my $undef = Data::Object::Undef->new(undef);

DESCRIPTION

Data::Object::Undef provides common methods for operating on Perl 5 undefined data. Undef methods work on undefined values.

COMPOSITION

This class inherits all functionality from the Data::Object::Role::Undef role and implements proxy methods as documented herewith.

METHODS

defined

# given undef

$undef->defined ? 'Yes' : 'No'; # No

The defined method always returns false. This method returns a Data::Object::Number object.

OPERATORS

This class overloads the following operators for your convenience.

bool

!!$undef

# equivilent to

$undef->data

string

"$undef"

# equivilent to

$undef->data

smartmatch

$value ~~ $undef

# equivilent to

$undef->data

SEE ALSO

AUTHOR

Al Newkirk <anewkirk@ana.io>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Al Newkirk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.