develooper Front page | perl.perl5.porters | Postings from May 2016

[perl #127976] each($scalar) error message anomalies

Father Chrysostomos via RT
May 17, 2016 03:24
[perl #127976] each($scalar) error message anomalies
Message ID:
On Sun Apr 24 14:47:40 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'
> Experimental each on scalar is now forbidden at -e line 1, at EOF
> Type of arg 1 to each must be hash or array (not scalar dereference)
> at -e line 1, at EOF
> Execution of -e aborted due to compilation errors.
> 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.)

I have pushed 69e7f50e50f and dc26b617f to address these issues.


Father Chrysostomos

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About