CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 2302
content-type: text/html; charset=utf-8
last-modified: Sun, 12 Oct 2025 07:32:22 GMT
date: Sun, 12 Oct 2025 07:32:22 GMT
strict-transport-security: max-age=15768000
Re: strictly no indirect object syntax? - nntp.perl.org
Front page | perl.perl5.porters |
Postings from July 2008
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: strictly no indirect object syntax?
From:
AbigailDate:
July 4, 2008 16:17Subject:
Re: strictly no indirect object syntax?Message ID:
20080704223135.GD27175@almandaOn Fri, Jul 04, 2008 at 08:50:00AM -0700, Jan Dubois wrote: > > While not indirect object syntax, I wonder if we shouldn't also do > something about "Car::->new" vs. "Car->new". The latter actually > means Car()->new when Car() is defined in the current namespace, > so it has a similar gotcha as indirect object syntax: > > sub Foo::method { print "Foo method\n" } > sub Bar::method { print "Bar method\n" } > > sub Foo { return bless [] => "Bar" } > > Foo->method; # Prints "Bar method" > Foo::->method; # Prints "Foo method" > Foo()->method; # Prints "Bar method" Yes, but the commonly followed standard is that subroutine names are in all lowercase. While I agree that in theory the gotcha is similar, in practise, it will be far less of an issue. > I think the "Foo->method" call should generate a warning that it is > being resolved as "Foo()->method", just like Well, only if it *is* resolved to "Foo()->method", that is, only warn if there's an actual Foo() subroutine that will be called. Otherwise the warning will trigger too many false positives to be of any use. Abigail
- Re: strictly no indirect object syntax? by Tom Christiansen
- Re: strictly no indirect object syntax? by demerphq
- strictly no indirect object syntax? by Nicholas Clark
- Re: strictly no indirect object syntax? by Gabor Szabo
- Re: strictly no indirect object syntax? by Nicholas Clark
- Re: strictly no indirect object syntax? by Bram
- Re: strictly no indirect object syntax? by chromatic
- Re: strictly no indirect object syntax? by Gabor Szabo
- Re: strictly no indirect object syntax? by Bram
- RE: strictly no indirect object syntax? by Jan Dubois
- Re: strictly no indirect object syntax? by Abigail
- Re: strictly no indirect object syntax? by Eric Wilhelm
- RE: strictly no indirect object syntax? by Jan Dubois
- Re: strictly no indirect object syntax? by Aristotle Pagaltzis
- Re: strictly no indirect object syntax? by Rick Delaney
- Re: strictly no indirect object syntax? by Aristotle Pagaltzis
- Re: strictly no indirect object syntax? by Reini Urban
- Re: strictly no indirect object syntax? by Jonathan Rockway
- Re: strictly no indirect object syntax? by Ben Morrow
- Re: strictly no indirect object syntax? by Aristotle Pagaltzis
- Re: strictly no indirect object syntax? by Ben Morrow
- Re: strictly no indirect object syntax? by Alexandr Ciornii
- Re: strictly no indirect object syntax? by Abigail
- RE: strictly no indirect object syntax? by Jan Dubois
- Re: strictly no indirect object syntax? by H.Merijn Brand
- Re: strictly no indirect object syntax? by Yuval Kogman
- Re: strictly no indirect object syntax? by Reini Urban
- Re: strictly no indirect object syntax? by Ed Avis
- Re: strictly no indirect object syntax? by merlyn
- Re: strictly no indirect object syntax? by Ed Avis
- Re: strictly no indirect object syntax? by Abigail
- RE: strictly no indirect object syntax? by Ed Avis
- Re: strictly no indirect object syntax? by Jesse Vincent
- Re: strictly no indirect object syntax? by chromatic
- Re: strictly no indirect object syntax? by Elliot Shank
- RE: strictly no indirect object syntax? by Ed Avis
- Re: strictly no indirect object syntax? by Abigail
- RE: strictly no indirect object syntax? by Ed Avis
- Re: strictly no indirect object syntax? by Reini Urban
- Re: strictly no indirect object syntax? by David Nicol
- Re: strictly no indirect object syntax? by H.Merijn Brand
- Re: strictly no indirect object syntax? by Yitzchak Scott-Thoennes
- Re: strictly no indirect object syntax? by Glenn Linderman
- Re: strictly no indirect object syntax? by Paul Fenwick
- Re: strictly no indirect object syntax? by Aristotle Pagaltzis
- Re: strictly no indirect object syntax? by Bram
- Re: strictly no indirect object syntax? by Bram
- Re: strictly no indirect object syntax? by Ben Morrow
- Re: strictly no indirect object syntax? by Dr.Ruud
- Re: strictly no indirect object syntax? by David Golden
- Re: strictly no indirect object syntax? by Yuval Kogman
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About