Class::Trait::Lib::TComparable(3pm)

Class::Trait::Lib::TComparable3pm

Trait for adding comparison abilities to your object

Overview

This trait gives your object a wide range of comparison abilities through its overloading of the <=> operator.

Sub-traits

TEquality

Requires

compare ($left, $right)

This method should return -1 if $left is less than $right, 0 if $left is equal to $right, and 1 if $left is greater than $right.

Overloads

<=>

Provides

equalTo ($left, $right)

This fufills the requirement of the sub-trait TEquality.

Releases

7 releases since Debian 5.0 (Lenny); the text changed 3 times.

  1. 5.0
  2. 6.0–7
  3. 8–10
  4. 11

Author

Stevan Little <[email protected]>

From libclass-trait-perl 0.31-4.1 in Debian 11 (Bullseye). Parsed by carta from the page's man source.