Love the idea. It seems, though, that all but the most trivial of classes would have to override _new_instance (if only to call their own constructor). At that point, ease-of-use begins to slip and I may as well manage the singleton member myself. I suggest having Class::Singleton call the constructor directly ($class->new) when creating a new instance.
2 out of 2 found this review helpful. Was this review helpful to you? Yes No