in reply to Re: Syntactic Question
in thread Two argument bless syntax

Hi davorg,

I would agree with you that should be used a new object called clone if the object was copied to the new object, which do not happen in the specified case.

I don't like that much allowing new called on a ref/obj, but it is safer to do it that way, that just bless the object with $_[0].

On the other hand, I think that croak or die with new called on a ref would be a better solution. The usual solution of just bless on $_[0] also die with "Attempt to bless into a reference", so I don't think it matters much.