-
Notifications
You must be signed in to change notification settings - Fork 550
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
each($scalar) error message anomalies #15291
Comments
From @cpansproutIn these examples, 5.12.4 represents perl before the each $scalar feature. 5.14.4 includes the feature. ./perl is 5.24-to-be, in which the feature has been removed. $ perl5.12.4 -e 'print each 1' Notice how the last two error messages are wrong. The last one is wrong because arrays are also accepted. $ perl5.12.4 -e 'print each $1' This last message is correct, but differs from the constant case. This may not be a problem (it is, after all, just an error message; not something encountered much in working code), but it does make testing a little inconvenient. The ‘hash (not constant item)’ should really be fixed, though. Should it be changed to the old ‘hash or array’, or should it change to match the ‘Experimental forbidden’ message? (Take note that each(1) was never permitted.) -- Father Chrysostomos |
From @cpansproutOn Sat Apr 23 14:27:58 2016, sprout wrote:
I now think the old message is best in this case. Also, since some syntax errors produce multiple error messages, for the ‘Experimental forbidden’ case I suggest we give two messages, since it will be more helpful, like this: $ perl -e 'print each $1' I hope to push patches after 5.24 if nobody objects. (Note also that I have discovered since by previous post that the hash functions use croak, whereas the array functions use yyerror. I propose making the hash functions also use yyerror, which allows for multiple messages and provides more diagnostic information, such as ‘at EOF’, ‘near blah blah blah’, etc.) -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sun Apr 24 14:47:40 2016, sprout wrote:
I have pushed 69e7f50 and dc26b61 to address these issues. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#127976 (status was 'resolved')
Searchable as RT127976$
The text was updated successfully, but these errors were encountered: