|
NAMEVenus::Role::Comparable - Comparable Role ABSTRACTComparable Role for Perl 5 SYNOPSIS package Example;
use Venus::Class;
base 'Venus::Kind';
with 'Venus::Role::Comparable';
sub numified {
return 2;
}
package main;
my $example = Example->new;
# my $result = $example->eq(2);
DESCRIPTIONThis package modifies the consuming package and provides methods for performing numerical and stringwise comparision operations or any object or raw data type. METHODSThis package provides the following methods: eqeq(any $arg) (boolean) The eq method performs an "equals" operation using the invocant and the argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
gege(any $arg) (boolean) The ge method performs a "greater-than-or-equal-to" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
gelegele(any $arg1, any $arg2) (boolean) 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. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
gtgt(any $arg) (boolean) The gt method performs a "greater-than" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
gtltgtlt(any $arg1, any $arg2) (boolean) The gtlt method performs a "greater-than" operation on the 1st argument, and "lesser-than" operation on the 2nd argument. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
isis(any $arg) (boolean) The is method performs an "is-exactly" operation using the invocant and the argument provided. If the argument provided is blessed and exactly the same as the invocant (i.e. shares the same address space) the operation will return truthy. Since 1.80
lele(any $arg) (boolean) The le method performs a "lesser-than-or-equal-to" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
ltlt(any $arg) (boolean) The lt method performs a "lesser-than" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
nene(any $arg) (boolean) The ne method performs a "not-equal-to" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
stst(object $arg) (boolean) The st method performs a "same-type" operation using the invocant and argument provided. If the argument provided is an instance of the invocant, or a subclass, the operation will return truthy. Since 1.80
tvtv(any $arg) (boolean) The tv method performs a "type-and-value-equal-to" operation using the invocant and argument provided. The operation will be performed as either a numerical or stringwise operation based upon the preference (i.e. the return value of the "comparer" method) of the invocant. Since 0.08
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (C) 2022, Awncorp, "awncorp@cpan.org". This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
|