Data::Object::Undef
Data-Object Undef Class
use Data::Object::Undef; my $undef = Data::Object::Undef->new(undef);
Data::Object::Undef provides routines for operating on Perl 5 undefined data. Undef methods work on undefined values.
This package implements the following methods.
# given undef my $undef = Data::Object::Undef->new(undef);
The new method expects an undefined value and returns a new class instance.
# given $undef $undef->roles;
The roles method returns the list of roles attached to object. This method returns a Data::Object::Array object.
my $rules = $undef->rules();
The rules method returns consumed rules.
# given undef $undef->defined ? 'Yes' : 'No'; # No
The defined method always returns false. This method returns a Data::Object::Number object.
# given $undef $undef->eq; # exception thrown
This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.
# given $undef $undef->gt; # exception thrown
# given $undef $undef->ge; # exception thrown
# given $undef $undef->lt; # exception thrown
# given $undef $undef->le; # exception thrown
# given $undef $undef->ne; # exception thrown
This package inherits all behavior from the folowing role(s):
Data::Object::Role::Detract
Data::Object::Role::Dumper
Data::Object::Role::Output
Data::Object::Role::Throwable
Data::Object::Role::Type
This package adheres to the requirements in the folowing rule(s):
Data::Object::Rule::Comparison
Data::Object::Rule::Defined
To install Data::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object
CPAN shell
perl -MCPAN -e shell install Data::Object
For more information on module installation, please visit the detailed CPAN module installation guide.