> =head1 TITLE
>
> Method calls should not suffer from the action on a distance
> Currently,
>
> foo->bar($baz)
>
> can be parsed either as C<<'foo'->bar($baz)>>, or as C<<foo()->bar($baz)>>
> depending on how the symbol C<foo> was used on other places. The proposal
> is to always choose the first meaning: make C<< -> >> autoquote the bareword
> on the left.
Before I forget to mention this again, here is why -> *cannot* autoquote
the LHS:
package Foo;
use overload q("") => STRING;
sub new { bless {@_}, shift; }
sub STRING {
return "Hello World!";
}
sub getdata {
# do stuff
}
package main;
my $foo = new Foo;
@data = $foo->getdata; # !!!
Unless we want that last line to fail - essentially rendering use
overload and polymorphic objects useless - then the -> operator must not
autoquote the LHS.
(And if the RFC is proposing autoquoting only barewords, then I think
that's _really_ inconsistent and should not be done.)
-Nate