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: new 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 new method constructs an instance of the package.
new(any @args) (Venus::Boolean)
{ since => '4.15', }
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
175 POD Errors
The following errors were encountered while parsing the POD:
- Around line 14:
Unknown directive: =name
- Around line 22:
Unknown directive: =tagline
- Around line 30:
Unknown directive: =abstract
- Around line 38:
Unknown directive: =includes
- Around line 62:
Unknown directive: =synopsis
- Around line 81:
Unknown directive: =description
- Around line 89:
Unknown directive: =inherits
- Around line 97:
Unknown directive: =method
- Around line 103:
Unknown directive: =signature
- Around line 107:
Unknown directive: =metadata
- Around line 149:
=cut found outside a pod block. Skipping to next block.
- Around line 173:
=cut found outside a pod block. Skipping to next block.
- Around line 197:
=cut found outside a pod block. Skipping to next block.
- Around line 221:
=cut found outside a pod block. Skipping to next block.
- Around line 245:
=cut found outside a pod block. Skipping to next block.
- Around line 269:
=cut found outside a pod block. Skipping to next block.
- Around line 293:
=cut found outside a pod block. Skipping to next block.
- Around line 317:
=cut found outside a pod block. Skipping to next block.
- Around line 341:
=cut found outside a pod block. Skipping to next block.
- Around line 352:
Unknown directive: =method
- Around line 356:
Unknown directive: =signature
- Around line 360:
Unknown directive: =metadata
- Around line 384:
Unknown directive: =method
- Around line 388:
Unknown directive: =signature
- Around line 392:
Unknown directive: =metadata
- Around line 435:
=cut found outside a pod block. Skipping to next block.
- Around line 459:
=cut found outside a pod block. Skipping to next block.
- Around line 483:
=cut found outside a pod block. Skipping to next block.
- Around line 507:
=cut found outside a pod block. Skipping to next block.
- Around line 531:
=cut found outside a pod block. Skipping to next block.
- Around line 555:
=cut found outside a pod block. Skipping to next block.
- Around line 579:
=cut found outside a pod block. Skipping to next block.
- Around line 603:
=cut found outside a pod block. Skipping to next block.
- Around line 627:
=cut found outside a pod block. Skipping to next block.
- Around line 637:
Unknown directive: =method
- Around line 642:
Unknown directive: =signature
- Around line 646:
Unknown directive: =metadata
- Around line 689:
=cut found outside a pod block. Skipping to next block.
- Around line 713:
=cut found outside a pod block. Skipping to next block.
- Around line 737:
=cut found outside a pod block. Skipping to next block.
- Around line 761:
=cut found outside a pod block. Skipping to next block.
- Around line 785:
=cut found outside a pod block. Skipping to next block.
- Around line 809:
=cut found outside a pod block. Skipping to next block.
- Around line 833:
=cut found outside a pod block. Skipping to next block.
- Around line 857:
=cut found outside a pod block. Skipping to next block.
- Around line 867:
Unknown directive: =method
- Around line 872:
Unknown directive: =signature
- Around line 876:
Unknown directive: =metadata
- Around line 919:
=cut found outside a pod block. Skipping to next block.
- Around line 943:
=cut found outside a pod block. Skipping to next block.
- Around line 967:
=cut found outside a pod block. Skipping to next block.
- Around line 991:
=cut found outside a pod block. Skipping to next block.
- Around line 1015:
=cut found outside a pod block. Skipping to next block.
- Around line 1039:
=cut found outside a pod block. Skipping to next block.
- Around line 1063:
=cut found outside a pod block. Skipping to next block.
- Around line 1087:
=cut found outside a pod block. Skipping to next block.
- Around line 1111:
=cut found outside a pod block. Skipping to next block.
- Around line 1121:
Unknown directive: =method
- Around line 1125:
Unknown directive: =signature
- Around line 1129:
Unknown directive: =metadata
- Around line 1172:
=cut found outside a pod block. Skipping to next block.
- Around line 1196:
=cut found outside a pod block. Skipping to next block.
- Around line 1220:
=cut found outside a pod block. Skipping to next block.
- Around line 1244:
=cut found outside a pod block. Skipping to next block.
- Around line 1268:
=cut found outside a pod block. Skipping to next block.
- Around line 1292:
=cut found outside a pod block. Skipping to next block.
- Around line 1316:
=cut found outside a pod block. Skipping to next block.
- Around line 1340:
=cut found outside a pod block. Skipping to next block.
- Around line 1364:
=cut found outside a pod block. Skipping to next block.
- Around line 1374:
Unknown directive: =method
- Around line 1379:
Unknown directive: =signature
- Around line 1383:
Unknown directive: =metadata
- Around line 1426:
=cut found outside a pod block. Skipping to next block.
- Around line 1450:
=cut found outside a pod block. Skipping to next block.
- Around line 1474:
=cut found outside a pod block. Skipping to next block.
- Around line 1498:
=cut found outside a pod block. Skipping to next block.
- Around line 1522:
=cut found outside a pod block. Skipping to next block.
- Around line 1546:
=cut found outside a pod block. Skipping to next block.
- Around line 1570:
=cut found outside a pod block. Skipping to next block.
- Around line 1594:
=cut found outside a pod block. Skipping to next block.
- Around line 1618:
=cut found outside a pod block. Skipping to next block.
- Around line 1628:
Unknown directive: =method
- Around line 1633:
Unknown directive: =signature
- Around line 1637:
Unknown directive: =metadata
- Around line 1661:
Unknown directive: =method
- Around line 1666:
Unknown directive: =signature
- Around line 1670:
Unknown directive: =metadata
- Around line 1694:
Unknown directive: =method
- Around line 1699:
Unknown directive: =signature
- Around line 1703:
Unknown directive: =metadata
- Around line 1746:
=cut found outside a pod block. Skipping to next block.
- Around line 1770:
=cut found outside a pod block. Skipping to next block.
- Around line 1794:
=cut found outside a pod block. Skipping to next block.
- Around line 1818:
=cut found outside a pod block. Skipping to next block.
- Around line 1842:
=cut found outside a pod block. Skipping to next block.
- Around line 1866:
=cut found outside a pod block. Skipping to next block.
- Around line 1890:
=cut found outside a pod block. Skipping to next block.
- Around line 1914:
=cut found outside a pod block. Skipping to next block.
- Around line 1938:
=cut found outside a pod block. Skipping to next block.
- Around line 1948:
Unknown directive: =method
- Around line 1952:
Unknown directive: =signature
- Around line 1956:
Unknown directive: =metadata
- Around line 1999:
=cut found outside a pod block. Skipping to next block.
- Around line 2023:
=cut found outside a pod block. Skipping to next block.
- Around line 2047:
=cut found outside a pod block. Skipping to next block.
- Around line 2071:
=cut found outside a pod block. Skipping to next block.
- Around line 2095:
=cut found outside a pod block. Skipping to next block.
- Around line 2119:
=cut found outside a pod block. Skipping to next block.
- Around line 2143:
=cut found outside a pod block. Skipping to next block.
- Around line 2167:
=cut found outside a pod block. Skipping to next block.
- Around line 2191:
=cut found outside a pod block. Skipping to next block.
- Around line 2201:
Unknown directive: =method
- Around line 2205:
Unknown directive: =signature
- Around line 2209:
Unknown directive: =metadata
- Around line 2252:
=cut found outside a pod block. Skipping to next block.
- Around line 2276:
=cut found outside a pod block. Skipping to next block.
- Around line 2300:
=cut found outside a pod block. Skipping to next block.
- Around line 2324:
=cut found outside a pod block. Skipping to next block.
- Around line 2348:
=cut found outside a pod block. Skipping to next block.
- Around line 2372:
=cut found outside a pod block. Skipping to next block.
- Around line 2396:
=cut found outside a pod block. Skipping to next block.
- Around line 2420:
=cut found outside a pod block. Skipping to next block.
- Around line 2444:
=cut found outside a pod block. Skipping to next block.
- Around line 2454:
Unknown directive: =method
- Around line 2458:
Unknown directive: =signature
- Around line 2462:
Unknown directive: =metadata
- Around line 2480:
=cut found outside a pod block. Skipping to next block.
- Around line 2500:
=cut found outside a pod block. Skipping to next block.
- Around line 2521:
=cut found outside a pod block. Skipping to next block.
- Around line 2532:
Unknown directive: =method
- Around line 2537:
Unknown directive: =signature
- Around line 2541:
Unknown directive: =metadata
- Around line 2565:
Unknown directive: =method
- Around line 2569:
Unknown directive: =signature
- Around line 2573:
Unknown directive: =metadata
- Around line 2609:
=cut found outside a pod block. Skipping to next block.
- Around line 2631:
=cut found outside a pod block. Skipping to next block.
- Around line 2641:
Unknown directive: =method
- Around line 2646:
Unknown directive: =signature
- Around line 2650:
Unknown directive: =metadata
- Around line 2674:
Unknown directive: =method
- Around line 2679:
Unknown directive: =signature
- Around line 2683:
Unknown directive: =metadata
- Around line 2726:
=cut found outside a pod block. Skipping to next block.
- Around line 2750:
=cut found outside a pod block. Skipping to next block.
- Around line 2774:
=cut found outside a pod block. Skipping to next block.
- Around line 2798:
=cut found outside a pod block. Skipping to next block.
- Around line 2822:
=cut found outside a pod block. Skipping to next block.
- Around line 2846:
=cut found outside a pod block. Skipping to next block.
- Around line 2870:
=cut found outside a pod block. Skipping to next block.
- Around line 2894:
=cut found outside a pod block. Skipping to next block.
- Around line 2918:
=cut found outside a pod block. Skipping to next block.
- Around line 2928:
Unknown directive: =operator
- Around line 2944:
=cut found outside a pod block. Skipping to next block.
- Around line 2954:
Unknown directive: =operator
- Around line 2970:
=cut found outside a pod block. Skipping to next block.
- Around line 2980:
Unknown directive: =operator
- Around line 2996:
=cut found outside a pod block. Skipping to next block.
- Around line 3006:
Unknown directive: =operator
- Around line 3022:
=cut found outside a pod block. Skipping to next block.
- Around line 3032:
Unknown directive: =operator
- Around line 3048:
=cut found outside a pod block. Skipping to next block.
- Around line 3058:
Unknown directive: =operator
- Around line 3074:
=cut found outside a pod block. Skipping to next block.
- Around line 3084:
Unknown directive: =operator
- Around line 3100:
=cut found outside a pod block. Skipping to next block.
- Around line 3110:
Unknown directive: =operator
- Around line 3126:
=cut found outside a pod block. Skipping to next block.
- Around line 3136:
Unknown directive: =operator
- Around line 3152:
=cut found outside a pod block. Skipping to next block.
- Around line 3162:
Unknown directive: =operator
- Around line 3178:
=cut found outside a pod block. Skipping to next block.
- Around line 3188:
Unknown directive: =operator
- Around line 3204:
=cut found outside a pod block. Skipping to next block.
- Around line 3214:
Unknown directive: =partials