in reply to Set modules and object comparison

Set::Scalar appears to key objects by stringification, so you could probably use
use overload '""' => sub { "SomePrefix".$_[0]->id };
in your object class to exploit that.

Or you could use Set::Scalar::Valued (included in the Set::Scalar distribution) which allows you to explicitly specify a key and the associated object.