New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove references to ref($proto)||$proto from perl*.pod #7418
Comments
From andy-baby@petdance.comCreated by andy-baby@petdance.comperlobj (and maybe others) advertise the constructor method of sub new { This is 99% of the time unnecessary. People copy & paste it into their constructors without understanding why. The standard way should be: sub new { and optionally explain why you'd want to do the old way. Perl Info
|
From @schwernOn Fri, Jul 09, 2004 at 10:15:45PM -0000, andy-baby @ petdance. com wrote:
I used to be in the ref $proto || $proto camp because I felt it would be But here's how many times I've used $obj->new: Zero. Andy's right, its not worth the confusion in the docs and it sidesteps -- |
The RT System itself - Status changed from 'new' to 'open' |
From @petdanceOn Sat, Jul 10, 2004 at 11:50:11PM -0400, Michael G Schwern (schwern@pobox.com) wrote:
If ever there was a case of YAGNI, this is it. :-) xoa -- |
From perl@nevcal.comOn approximately 7/10/2004 8:57 PM, came the following characters from
In perl land, shouldn't we call that TOTMWTDI ?? :) Nope, even Google can't find There's One Too Many Ways To Do It :) --
|
@petdance - Status changed from 'open' to 'new' |
From @jkeenanOn Fri Jul 09 15:15:45 2004, andy-baby@petdance.com wrote:
This is what I currently find in 'pod/perlobj.pod': sub new { sub new { And this is what I find in 'pod/perldiag.pod': (F) The CLASSNAME argument to the bless() operator is expected to be bless $self, $proto; when you intended bless $self, ref($proto) || $proto; |
The RT System itself - Status changed from 'new' to 'open' |
From @b2gillsOn Fri, Nov 25, 2011 at 8:45 PM, James E Keenan via RT
This is the simplest way to use a constructor as a method on an object. % perl -E'$a=bless[]; say $a; $a=bless[],$a; say $a' |
From @rjbsI think Jim was looking at 5.14, rather than blead, actually. perlobj I think this request has been addressed. |
@rjbs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#30663 (status was 'resolved')
Searchable as RT30663$
The text was updated successfully, but these errors were encountered: