-
-
01 Jul 2022 21:18:33 UTC
- Distribution: SPVM
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (12)
- Testers (119 / 0 / 1)
- Kwalitee
Bus factor: 1- 81.36% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (870.32KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- ExtUtils::CBuilder
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Name
SPVM::EqualityChecker::SameObject - a callback implementation of EqualityChecker to check if the memory addresses of the two objects are equal.
Synopsys
use EqualityChecker::SameObject; my $equality_checker = EqualityChecker::SameObject->new; my $point1 = Point->new(1, 2); my $point2 = $point1; my $point3 = Point->new(1, 2); # Equals my $is_equal = $equality_checker->($point1, $point2); # Not equals my $is_equal = $equality_checker->($point1, $point3);
Description
EqualityChecker::SameObject is a callback implementation of EqualityChecker to check if the memory addresses of the two objects are equal.
Class Methods
new
static method new : EqualityChecker::SameObject ()
Create a new EqualityChecker::SameObject object.
Interface Method IMPLEMENTATION
method : int ($object1 : object, $object2 : object)
If the address of the two objects are equal, return 1, otherwise return 0.
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.