NAME
Data::Object::Boolean
ABSTRACT
Boolean Class for Perl 5
SYNOPSIS
package main;
use Data::Object::Boolean;
my $bool = Data::Object::Boolean->new; # false
DESCRIPTION
This package provides functions and representation for boolean values.
INHERITS
This package inherits behaviors from:
LIBRARIES
This package uses type constraints from:
FUNCTIONS
This package implements the following functions:
false
False() : Object
The False method returns a boolean object representing false.
isfalse
IsFalse(Maybe[Any] $arg) : Object
The IsFalse method returns a boolean object representing false if no arugments are passed, otherwise this function will return a boolean object based on the argument provided.
istrue
IsTrue() : Object
The IsTrue method returns a boolean object representing truth if no arugments are passed, otherwise this function will return a boolean object based on the argument provided.
to_json
TO_JSON(Any $arg) : Ref['SCALAR']
The TO_JSON method returns a scalar ref representing truthiness or falsiness based on the arguments passed, this function is commonly used by JSON encoders and instructs them on how they should represent the value.
true
True() : Object
The True method returns a boolean object representing truth.
type
Type() : Str
The Type method returns either "True" or "False" based on the truthiness or falsiness of the argument provided.
METHODS
This package implements the following methods:
new
new(Maybe[Any] $arg) : Object
The new method returns a boolean object based on the value of the argument provided.
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".