in reply to Re: Re: $self->{foo} in sub new {}
in thread $self->{foo} in sub new {}
But we're not golfing here.sub new { bless {}, shift }
I see no problem in letting the return value of bless be the return value from a constructor, provided that there's no need to address the intermediate reference during the construction of the object.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|