Unfortunately I think you're right, these are just a few additional thoughts.

that's unfortunate, prototypes don't seem to influence precedence at all

Nitpick: They do influence precedence/parsing, just not in the way you want - from Prototypes:

sub mygrep (&@) mygrep { /foo/ } $a, $b, $c sub myrand (;$) myrand 42
... treated specially by the parser. mygrep() is parsed as a true list operator, myrand() is parsed as a true unary operator with unary precedence the same as rand() ...
$ perl -MO=Deparse,-p -e 'sub myrand (;$) {} rand 123 / rand 456; myra +nd 123 / myrand 456' sub myrand (;$) {} rand((123 / rand(456))); myrand((123 / myrand(456))); $ perl -MO=Deparse,-p -e 'sub mygrep (&@) {} grep {$A} + grep {$B} 1; +mygrep {$A} + mygrep {$B} 1' sub mygrep (&@) {} grep( {$A;} grep( {$B;} 1)); mygrep(sub {$A;}, mygrep(sub {$B;}, 1));

... so builtins do basically behave the same way in terms of precedence - though as of 5.34 there isn't a builtin with a prototype of (&) or even (&@); grep has no prototype, which indicates it is treated specially by the parser (which is why I had to add the 1 after the above grep lest it be a syntax error instead of Not enough arguments).

Update: Relevant: Named Unary Operators


In reply to Re: (SOLVED) parsing problems with prototype blocks (updated) by haukex
in thread (SOLVED) parsing problems with prototype blocks (precedence) by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.