Michael Fowler wrote:
> 
> You're beginning to blur your own fine line here.  import is a class method
> call using indirect object syntax.

And, actually, per Schwern's RFC 253, require() would be too. Sometimes.

>     stat->{'mode'}
> 
> No ambiguity here.

So I assume you're suggesting that this:

  stat->{'mode'}

be a call to stat(), which returns a hashref, but this:

  stat->mode

would be a call to the method mode() in the class 'stat'????

That's not how I read RFC 244. If it is, I like it even worse. You
expect a beginner or even intermediate user to wrap their heads around
that?

The goal of my RFC was to point out the problems with barewords vs.
functions, and I'm glad this discussion is taking place. My main point
is that this ambiguity does *not* occur often enough to warrant
special-casing -> as RFC 244 and others propose. If people want to, they
can "use strict 'words'", which I suggest in RFC 278, as a way to fix
this problem.

Auto-quoting -> is a Bad Idea. Let's not forget there's plenty of ways
to disambiguate this already!

   $stuff = stat::->mode;   # class 'stat'
   $stuff = stat()->mode;   # function 'stat'

Why should we make Perl any less flexible by default? I just don't get
it. I've personally never had any problems with this:

   $q = CGI->new

Accidentally calling CGI()->new. Has anyone else really? Or is this a
theoretical concern?

-Nate

Reply via email to