note
eyepopslikeamosquito
<P>
[chromatic] nicely summarises the parsing problem [id://645839|here]:
</P>
<P>
<blockquote>
<P>
<C>new Foo</C> has two barewords, and whenever the Perl parser encounters barewords, it has to guess at what they are.
Sometimes it has hints at what those barewords are (if it's encountered declarations of filehandles or subroutines)
and it can guess correctly. Sometimes it doesn't have hints, because Perl embraces late binding.
</P>
</blockquote>
</P>
<P>
See also:
<ul>
<li> <a href="https://www.effectiveperlprogramming.com/2020/06/turn-off-indirect-object-notation/">Turn off indirect object notation</a> - Effective Perler article by [brian_d_foy]
<li> <a href="https://www.oreilly.com/library/view/perl-best-practices/0596001738/">Perl Best Practices</a> section 15.12 <I>"Don't use the indirect object syntax"</I>
<li> <a href="https://www.oreilly.com/library/view/perl-cookbook-2nd/0596003137/">Perl Cookbook</a> chapter 13, <I>"A Warning on Indirect Object Notation"</I> section
<li> <a href="https://metacpan.org/pod/Perl::Critic::Policy::Objects::ProhibitIndirectSyntax">Perl::Critic policy to prohibit indirect object call syntax</a>
<li> <a href="https://stackoverflow.com/questions/58263206/how-does-perl-parse-unquoted-bare-words/">How does Perl parse unquoted bare words?</a> (SO [id://11138581|by ikegami])
</ul>
</P>
<P>
Related:
<ul>
<li> [id://1226973|Why I always use parens when calling user-defined subroutines]
</ul>
</P>
<P>
Added later:
<ul>
<li> [id://11102684] by [haukex] (2019)
<li> [id://11152428] by [mikkoi] (2023)
</ul>
</P>
<P>
<ul>
<li> <a href="https://perldoc.perl.org/perlobj#Indirect-Object-Syntax">perlobj: Invoking Class Methods: Indirect Object Syntax</a> (perldoc) - <I>"We recommend that you avoid this syntax"</I>
<li> <a href="https://perldoc.perl.org/perl5360delta#use-v5.36">perl5360delta: use v5.36</a> (perldoc) - <I>"The 5.36 bundle also disables the features indirect ... will forbid ... the use of "indirect" method calls ... that cause more trouble than they're worth"</I>
</ul>
</P>
<P>
<ul>
<li> <a href="https://perldoc.perl.org/perlobj#Indirect-Object-Syntax">Indirect Object Syntax</a> (perldoc)
<li> [id://11138524] by [Bod] (2021)
<li> [id://11158326] by [syphilis] (2024)
</ul>
</P>
11138524
11138524