New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method-like thingies do not work with indirect object notation (&[leg] ‘a’: ‘b’) #5293
Comments
From @AlexDanielThis works: Code: Result: But this does not: Code: Result: Obviously, this is very important. |
From @TimToadyWhile semantically this could be made equivalent to the . form, the syntax will not admit it. Apart from .method names with an explicit colon, only bare names (and indeed, only bare names that are not known to be predefined as terms) are allowed to assume they have arguments and expect a subsequent term. All other nouns, including all sigiled forms, are required to expect an infix (possibly with intervening postfixes). In particular, the &foo form is explicitly a noun, not a verb, and will never invoke the function without explicit parentheses (or some higher-order helper function to invoke it on your behalf, such as map). The &[leg] form is merely a variant of the &foo sigiled form in this regard, so cannot be followed by �a�. It never even gets to the point of considering the invocant colon, but fails from a two-terms-in-a-row variety of parsefail. Or looking at it from the other direction, we can't use colon to retroactively change what precedes it from an operator to a term; this would be a forbidden form of multi-pass parsing. |
The RT System itself - Status changed from 'new' to 'open' |
@TimToady - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#128059 (status was 'rejected')
Searchable as RT128059$
The text was updated successfully, but these errors were encountered: