in reply to Re7: Constructor/Factory Orthodoxy
in thread Constructor/Factory Orthodoxy
my $class = ref $this || $this;
meant cloning. It wasn't suggested by the OP, nor is it suggested by most people using this construct. I fully agree that cloning is something you only should do in very specific cases (and you'd need the full cooperation of all classes in the inheritance tree). It's easier to fix your perception than all the code using it.
However, I don't find that an argument against the quoted contruct. It only gets confusing because you assign a totally different meaning to the construct then the construct is. That doesn't make the construct wrong. The only thing that's wrong is your perception of it.
Abigail
|
|---|