-
Notifications
You must be signed in to change notification settings - Fork 44
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
PPI differs from perl: // parseed as defined-or instead of regexp #302
Comments
Can you provide the example code as valid perl? I get this error trying to compile it:
|
valid perl will be:
|
In those examples Perl seems to treat // as the undef-or operator.
|
Nevermind that, in the ref example it also treats it as the undef-or operator, because ref returns the empty string
|
So, in conclusion: Right now i need an example of working Perl code where // is treated by Perl as a regex match, and evidence for this being the case. :) |
OK, probably some clarification: IMHO it is fine when |
Note that you wrote:
Can you clarify what your evidence for this is? (I find it hard to understand, given that Perl just crashes when presented with such code, instead of actually running it.) |
|
I think this one is the same issue as #304, which is that we don't know the prototype of the function, and we take a different default path than the Perl parse, but changing the default would overall lead to less useful output. The only solution would be to actually track prototypes, and also force users to provide external data on prototypes where the single input file isn't enough to decide. |
In expression
identifier //
(when identifier is not method call), Perl treats//
as:()
prototypeFor example, parsing
ref // 1
:But current result should be preserved for parsing eg:
my sub ref (); ref // 1
The text was updated successfully, but these errors were encountered: