Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am not sure I understand your point. I think you are trying to say that is no better/worse than which is quite true, and since that is also a common idiom which will produce the same issue, then maybe that is not so good either. In all cases, $class is undef, and when bless is passed undef it blesses into main. It might (and I stress might, because I am not so sure of this) make sense if when bless encountered undef in its second argument, that it treated it as a one-argument bless instead (which would result in blessing into the current package).
-stvn
In reply to Re^2: Is "ref($class) || $class" a bad thing?
by stvn
|
|