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.
In reply to •Re: Re: Re: $self->{foo} in sub new {}
by merlyn
in thread $self->{foo} in sub new {}
by Taulmarill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |