Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterpriseseach($scalar) error message anomalies #15291
Comments
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
The RT System itself - Status changed from 'new' to 'open' |
This comment has been minimized.
This comment has been minimized.
From @cpansproutOn Sun Apr 24 14:47:40 2016, sprout wrote:
I have pushed 69e7f50 and dc26b61 to address these issues. -- Father Chrysostomos |
This comment has been minimized.
This comment has been minimized.
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#127976 (status was 'resolved')
Searchable as RT127976$