Java solves this with the Object class, which all objects derive from. It contains the "equals" method which returns the address of the object (IIRC) by default and can be overloaded by the child.
While this is great for Java, obviously there's no such thing in Perl. However, you may want to just pick a method name and stick with it (a la "equals") and wrap it in an eval. If it bombs, just compare the addresses by default.