Venus::Boolean

Boolean Class

Boolean Class for Perl 5

method: cast method: default method: eq method: ge method: gele method: gt method: gtlt method: is_false method: is_true method: le method: lt method: ne method: negate method: numified method: string method: tv

package main;

use Venus::Boolean;

my $boolean = Venus::Boolean->new;

# $boolean->negate;

This package provides a representation for boolean values.

Venus::Kind::Value

The cast method converts "value" objects between different "value" object types, based on the name of the type provided. This method will return undef if the invocant is not a Venus::Kind::Value.

cast(string $kind) (object | undef)

{ since => '0.08', }

=example-1 cast

package main;

use Venus::Boolean;

my $boolean = Venus::Boolean->new;

my $cast = $boolean->cast('array');

# bless({ value => [0] }, "Venus::Array")

The default method returns the default value, i.e. 0.

default() (boolean)

{ since => '0.01', }

=example-1 default

# given: synopsis;

my $default = $boolean->default;

# 0

The eq method performs an "equals" operation using the argument provided.

eq(any $arg) (boolean)

{ since => '0.08', }

=example-1 eq

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->eq($rvalue);

# 0

The ge method performs a "greater-than-or-equal-to" operation using the argument provided.

ge(any $arg) (boolean)

{ since => '0.08', }

=example-1 ge

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->ge($rvalue);

# 0

The gele method performs a "greater-than-or-equal-to" operation on the 1st argument, and "lesser-than-or-equal-to" operation on the 2nd argument.

gele(any $arg1, any $arg2) (boolean)

{ since => '0.08', }

=example-1 gele

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->gele($rvalue);

# 0

The gt method performs a "greater-than" operation using the argument provided.

gt(any $arg) (boolean)

{ since => '0.08', }

=example-1 gt

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->gt($rvalue);

# 0

The gtlt method performs a "greater-than" operation on the 1st argument, and "lesser-than" operation on the 2nd argument.

gtlt(any $arg1, any $arg2) (boolean)

{ since => '0.08', }

=example-1 gtlt

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->gtlt($rvalue);

# 0

The is_false method returns false if the boolean is falsy, otherwise returns true.

is_false() (boolean)

{ since => '0.01', }

=example-1 is_false

# given: synopsis;

my $is_false = $boolean->is_false;

# 1

The is_true method returns true if the boolean is truthy, otherwise returns false.

is_true() (boolean)

{ since => '0.01', }

=example-1 is_true

# given: synopsis;

my $is_true = $boolean->is_true;

# 0

The le method performs a "lesser-than-or-equal-to" operation using the argument provided.

le(any $arg) (boolean)

{ since => '0.08', }

=example-1 le

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->le($rvalue);

# 1

The lt method performs a "lesser-than" operation using the argument provided.

lt(any $arg) (boolean)

{ since => '0.08', }

=example-1 lt

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->lt($rvalue);

# 1

The ne method performs a "not-equal-to" operation using the argument provided.

ne(any $arg) (boolean)

{ since => '0.08', }

=example-1 ne

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->ne($rvalue);

# 1

The negate method returns true if the boolean is falsy, otherwise returns false.

negate() (boolean)

{ since => '0.01', }

=example-1 negate

# given: synopsis;

my $negate = $boolean->negate;

# 1

The numified method returns the numerical representation of the object.

numified() (number)

{ since => '0.08', }

=example-1 numified

# given: synopsis;

my $numified = $boolean->numified;

# 1

The string method returns the word 'true' if the boolean is truthy, otherwise returns 'false'. This method was formerly named "type".

string() (string)

{ since => '0.08', }

=example-1 string

# given: synopsis;

my $string = $boolean->string;

# "false"

The tv method performs a "type-and-value-equal-to" operation using argument provided.

tv(any $arg) (boolean)

{ since => '0.08', }

=example-1 tv

package main;

use Venus::Array;
use Venus::Boolean;

my $lvalue = Venus::Boolean->new;
my $rvalue = Venus::Array->new;

my $result = $lvalue->tv($rvalue);

# 0

This package overloads the ! operator.

This package overloads the < operator.

This package overloads the <= operator.

This package overloads the > operator.

This package overloads the >= operator.

This package overloads the != operator.

This package overloads the == operator.

This package overloads the bool operator.

This package overloads the eq operator.

This package overloads the ne operator.

This package overloads the qr operator.

t/Venus.t: present: authors t/Venus.t: present: license

169 POD Errors

The following errors were encountered while parsing the POD:

Around line 13:

Unknown directive: =name

Around line 21:

Unknown directive: =tagline

Around line 29:

Unknown directive: =abstract

Around line 37:

Unknown directive: =includes

Around line 60:

Unknown directive: =synopsis

Around line 79:

Unknown directive: =description

Around line 87:

Unknown directive: =inherits

Around line 95:

Unknown directive: =method

Around line 101:

Unknown directive: =signature

Around line 105:

Unknown directive: =metadata

Around line 147:

=cut found outside a pod block. Skipping to next block.

Around line 171:

=cut found outside a pod block. Skipping to next block.

Around line 195:

=cut found outside a pod block. Skipping to next block.

Around line 219:

=cut found outside a pod block. Skipping to next block.

Around line 243:

=cut found outside a pod block. Skipping to next block.

Around line 267:

=cut found outside a pod block. Skipping to next block.

Around line 291:

=cut found outside a pod block. Skipping to next block.

Around line 315:

=cut found outside a pod block. Skipping to next block.

Around line 339:

=cut found outside a pod block. Skipping to next block.

Around line 350:

Unknown directive: =method

Around line 354:

Unknown directive: =signature

Around line 358:

Unknown directive: =metadata

Around line 382:

Unknown directive: =method

Around line 386:

Unknown directive: =signature

Around line 390:

Unknown directive: =metadata

Around line 433:

=cut found outside a pod block. Skipping to next block.

Around line 457:

=cut found outside a pod block. Skipping to next block.

Around line 481:

=cut found outside a pod block. Skipping to next block.

Around line 505:

=cut found outside a pod block. Skipping to next block.

Around line 529:

=cut found outside a pod block. Skipping to next block.

Around line 553:

=cut found outside a pod block. Skipping to next block.

Around line 577:

=cut found outside a pod block. Skipping to next block.

Around line 601:

=cut found outside a pod block. Skipping to next block.

Around line 625:

=cut found outside a pod block. Skipping to next block.

Around line 635:

Unknown directive: =method

Around line 640:

Unknown directive: =signature

Around line 644:

Unknown directive: =metadata

Around line 687:

=cut found outside a pod block. Skipping to next block.

Around line 711:

=cut found outside a pod block. Skipping to next block.

Around line 735:

=cut found outside a pod block. Skipping to next block.

Around line 759:

=cut found outside a pod block. Skipping to next block.

Around line 783:

=cut found outside a pod block. Skipping to next block.

Around line 807:

=cut found outside a pod block. Skipping to next block.

Around line 831:

=cut found outside a pod block. Skipping to next block.

Around line 855:

=cut found outside a pod block. Skipping to next block.

Around line 865:

Unknown directive: =method

Around line 870:

Unknown directive: =signature

Around line 874:

Unknown directive: =metadata

Around line 917:

=cut found outside a pod block. Skipping to next block.

Around line 941:

=cut found outside a pod block. Skipping to next block.

Around line 965:

=cut found outside a pod block. Skipping to next block.

Around line 989:

=cut found outside a pod block. Skipping to next block.

Around line 1013:

=cut found outside a pod block. Skipping to next block.

Around line 1037:

=cut found outside a pod block. Skipping to next block.

Around line 1061:

=cut found outside a pod block. Skipping to next block.

Around line 1085:

=cut found outside a pod block. Skipping to next block.

Around line 1109:

=cut found outside a pod block. Skipping to next block.

Around line 1119:

Unknown directive: =method

Around line 1123:

Unknown directive: =signature

Around line 1127:

Unknown directive: =metadata

Around line 1170:

=cut found outside a pod block. Skipping to next block.

Around line 1194:

=cut found outside a pod block. Skipping to next block.

Around line 1218:

=cut found outside a pod block. Skipping to next block.

Around line 1242:

=cut found outside a pod block. Skipping to next block.

Around line 1266:

=cut found outside a pod block. Skipping to next block.

Around line 1290:

=cut found outside a pod block. Skipping to next block.

Around line 1314:

=cut found outside a pod block. Skipping to next block.

Around line 1338:

=cut found outside a pod block. Skipping to next block.

Around line 1362:

=cut found outside a pod block. Skipping to next block.

Around line 1372:

Unknown directive: =method

Around line 1377:

Unknown directive: =signature

Around line 1381:

Unknown directive: =metadata

Around line 1424:

=cut found outside a pod block. Skipping to next block.

Around line 1448:

=cut found outside a pod block. Skipping to next block.

Around line 1472:

=cut found outside a pod block. Skipping to next block.

Around line 1496:

=cut found outside a pod block. Skipping to next block.

Around line 1520:

=cut found outside a pod block. Skipping to next block.

Around line 1544:

=cut found outside a pod block. Skipping to next block.

Around line 1568:

=cut found outside a pod block. Skipping to next block.

Around line 1592:

=cut found outside a pod block. Skipping to next block.

Around line 1616:

=cut found outside a pod block. Skipping to next block.

Around line 1626:

Unknown directive: =method

Around line 1631:

Unknown directive: =signature

Around line 1635:

Unknown directive: =metadata

Around line 1659:

Unknown directive: =method

Around line 1664:

Unknown directive: =signature

Around line 1668:

Unknown directive: =metadata

Around line 1692:

Unknown directive: =method

Around line 1697:

Unknown directive: =signature

Around line 1701:

Unknown directive: =metadata

Around line 1744:

=cut found outside a pod block. Skipping to next block.

Around line 1768:

=cut found outside a pod block. Skipping to next block.

Around line 1792:

=cut found outside a pod block. Skipping to next block.

Around line 1816:

=cut found outside a pod block. Skipping to next block.

Around line 1840:

=cut found outside a pod block. Skipping to next block.

Around line 1864:

=cut found outside a pod block. Skipping to next block.

Around line 1888:

=cut found outside a pod block. Skipping to next block.

Around line 1912:

=cut found outside a pod block. Skipping to next block.

Around line 1936:

=cut found outside a pod block. Skipping to next block.

Around line 1946:

Unknown directive: =method

Around line 1950:

Unknown directive: =signature

Around line 1954:

Unknown directive: =metadata

Around line 1997:

=cut found outside a pod block. Skipping to next block.

Around line 2021:

=cut found outside a pod block. Skipping to next block.

Around line 2045:

=cut found outside a pod block. Skipping to next block.

Around line 2069:

=cut found outside a pod block. Skipping to next block.

Around line 2093:

=cut found outside a pod block. Skipping to next block.

Around line 2117:

=cut found outside a pod block. Skipping to next block.

Around line 2141:

=cut found outside a pod block. Skipping to next block.

Around line 2165:

=cut found outside a pod block. Skipping to next block.

Around line 2189:

=cut found outside a pod block. Skipping to next block.

Around line 2199:

Unknown directive: =method

Around line 2203:

Unknown directive: =signature

Around line 2207:

Unknown directive: =metadata

Around line 2250:

=cut found outside a pod block. Skipping to next block.

Around line 2274:

=cut found outside a pod block. Skipping to next block.

Around line 2298:

=cut found outside a pod block. Skipping to next block.

Around line 2322:

=cut found outside a pod block. Skipping to next block.

Around line 2346:

=cut found outside a pod block. Skipping to next block.

Around line 2370:

=cut found outside a pod block. Skipping to next block.

Around line 2394:

=cut found outside a pod block. Skipping to next block.

Around line 2418:

=cut found outside a pod block. Skipping to next block.

Around line 2442:

=cut found outside a pod block. Skipping to next block.

Around line 2452:

Unknown directive: =method

Around line 2457:

Unknown directive: =signature

Around line 2461:

Unknown directive: =metadata

Around line 2485:

Unknown directive: =method

Around line 2489:

Unknown directive: =signature

Around line 2493:

Unknown directive: =metadata

Around line 2529:

=cut found outside a pod block. Skipping to next block.

Around line 2551:

=cut found outside a pod block. Skipping to next block.

Around line 2561:

Unknown directive: =method

Around line 2566:

Unknown directive: =signature

Around line 2570:

Unknown directive: =metadata

Around line 2594:

Unknown directive: =method

Around line 2599:

Unknown directive: =signature

Around line 2603:

Unknown directive: =metadata

Around line 2646:

=cut found outside a pod block. Skipping to next block.

Around line 2670:

=cut found outside a pod block. Skipping to next block.

Around line 2694:

=cut found outside a pod block. Skipping to next block.

Around line 2718:

=cut found outside a pod block. Skipping to next block.

Around line 2742:

=cut found outside a pod block. Skipping to next block.

Around line 2766:

=cut found outside a pod block. Skipping to next block.

Around line 2790:

=cut found outside a pod block. Skipping to next block.

Around line 2814:

=cut found outside a pod block. Skipping to next block.

Around line 2838:

=cut found outside a pod block. Skipping to next block.

Around line 2848:

Unknown directive: =operator

Around line 2864:

=cut found outside a pod block. Skipping to next block.

Around line 2874:

Unknown directive: =operator

Around line 2890:

=cut found outside a pod block. Skipping to next block.

Around line 2900:

Unknown directive: =operator

Around line 2916:

=cut found outside a pod block. Skipping to next block.

Around line 2926:

Unknown directive: =operator

Around line 2942:

=cut found outside a pod block. Skipping to next block.

Around line 2952:

Unknown directive: =operator

Around line 2968:

=cut found outside a pod block. Skipping to next block.

Around line 2978:

Unknown directive: =operator

Around line 2994:

=cut found outside a pod block. Skipping to next block.

Around line 3004:

Unknown directive: =operator

Around line 3020:

=cut found outside a pod block. Skipping to next block.

Around line 3030:

Unknown directive: =operator

Around line 3046:

=cut found outside a pod block. Skipping to next block.

Around line 3056:

Unknown directive: =operator

Around line 3072:

=cut found outside a pod block. Skipping to next block.

Around line 3082:

Unknown directive: =operator

Around line 3098:

=cut found outside a pod block. Skipping to next block.

Around line 3108:

Unknown directive: =operator

Around line 3124:

=cut found outside a pod block. Skipping to next block.

Around line 3134:

Unknown directive: =partials