-
-
18 Aug 2022 03:49:25 UTC
- Distribution: SPVM
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (12)
- Testers (47 / 1 / 0)
- Kwalitee
Bus factor: 1- 82.79% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (907.26KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- ExtUtils::CBuilder
- Time::Piece
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Name
SPVM::EqualityChecker - Interface Type for Object Equality Checking Callback
Usage
use EqualityChecker; use Point; my $equality_checker = (EqualityChecker)method : int ($object1 : object, $object2 : object) { my $point1 = (Point)$object1; my $point2 = (Point)$object2; if ($point1->x == $point2->x && $point1->y == $point2->y) { return 1; } else { return 0; } }; my $point1 = Point->new(1, 2); my $point2 = Point->new(5, 6); my $is_equal = $equality_checker->($point1, $point2);
Description
EqualityChecker is the interface type for the object equality checking callback.
Interface Methods
required method : int ($object1 : object, $object2 : object)
The implementation must receive two objects and if they are equal, return
1
, otherwise return0
.Module Install Instructions
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm SPVM
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.