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
$leftis less than$right, 0 if$leftis equal to$right, and 1 if$leftis greater than$right.
Overloads
- <=>
Provides
- equalTo ($left, $right)
-
This fufills the requirement of the sub-trait TEquality.
Copyright and license
Copyright 2004, 2005 by Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Releases
7 releases since Debian 5.0 (Lenny); the text changed 3 times.