Created
January 8, 2010 04:40
-
-
Save djmitche/271855 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my $obj1 = MyClass->new(); | |
| my $obj2 = MyClass->new(); | |
| my $someobj = $obj1; | |
| not_ok($obj1 eq $obj2); | |
| ok($obj1 eq $someobj); | |
| # equality means identity here: if $oneobj eq $anotherobj, | |
| # then after $oneobj->set_foo(10), $anotherobj->get_foo() returns 10 | |
| # in python, this is the "is" operator. What's the Perl equivalent? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment