in reply to (jeffa) 3Re: My first stab at OO perl...
in thread My first stab at OO perl...
Me, I've been castigated by merlyn for using ref($caller), and I've (sort of) come around to his view. That is, $obj->new() just always struck me as a perfectly reasonable way to obtain a new, 'blank' object of the object's class. Expecting it to clone just never made any sense to me (if you meant it to clone, you'd've named it clone(), right?). But I've come to sense that I'm in the minority on this one, and calling $obj->new() hasn't ever been truly necessary in my code anyway; if this is going to be that confusing to that many people, then it's a de facto bad idea. (Though still, I'd like to know how many people would really be confused by this, and how many wouldn't be, but are just saying that someone else may get confused.)
-- Frag.
|
---|
Replies are listed 'Best First'. | |
---|---|
Why ref($proto) should be avoided
by jeffa (Bishop) on Jul 17, 2002 at 06:10 UTC | |
by frag (Hermit) on Jul 17, 2002 at 11:30 UTC | |
by jeffa (Bishop) on Jul 17, 2002 at 14:49 UTC |