Piers Cawley writes: > I found myself mulling over: > > $obj.is($other_obj); > > Which seems to work reasonably well, and I'd be rather surprised if it > clashed with anything with different semantics...
I quite like it. It also has the advantage of disallowing the equivalent of: my $stored_identity = $obj.id; # Time passes... if ($other_obj.id == $stored_identity) { # Massive breakage ahoy } There just isn't any way you can get .is() to compare identities at different times. -- Aaron Crane * GBdirect Ltd. http://training.gbdirect.co.uk/courses/perl/