-
Notifications
You must be signed in to change notification settings - Fork 571
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
misleading diagnostic for y() function call #13308
Comments
From victor@vsespb.rurelated old ticket: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=30045 $cat 1.pl use diagnostics; $ perlbrew exec --with perl-5.10.1 perl 1.pl
|
From @nwc10On Tue, Sep 24, 2013 at 12:20:40PM -0700, Victor Efimov wrote:
That ';' at the end of the last line appears to be crucial. If I remove it, $ ./perl -e 'sub y {};' -e 'y(1)' Bisecting the example as an eval bisect.pl --target=miniperl -e 'sub y {}; eval "y(1);"; print "$]: reveals that the message changes with this commit (which is post 5.12.0): commit 1107659 Fix eval 'q;;' The parser expects a semicolon at the end of every statement, so the Putting the example into a file reveals the earlier commit which changed $ cat ../test/119987.pl commit f0e67a1 lexer API Attached is a patch that adds a public API for the lowest layers of :100644 100644 22db6a3c9011829aff5176a7bacd4373f9c1d354 b8073eb771a2c615c876970bc1883bd4316cc88c M MANIFEST I have no more insight than this. It may not be an easy thing to fix. Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Tue, Sep 24, 2013 at 3:20 PM, Victor Efimov <perlbug-followup@perl.org>wrote:
The Perl parser requires a ";" at the end of the file, so it injects one, y(); which is another way or writing y()( Perl doesn't emit "transliteration replacement not terminated" because it It might be possible to give a better diagnostic in the case where C<< y();
- Eric |
From victor@vsespb.ruThis example does not call sub s(). Silently. use strict; maybe it's possible to emit warnings each time when first delimiter pair On Wed Sep 25 08:47:23 2013, ikegami@adaelis.com wrote:
|
From @rjbs* Eric Brine <ikegami@adaelis.com> [2013-09-25T11:46:33]
*facepalm* -- *high five* -- |
From @cpansproutOn Wed Sep 25 08:47:23 2013, ikegami@adaelis.com wrote:
We really should change the lexer to emit the ';' itself, instead of -- Father Chrysostomos |
From victor@vsespb.ruOn Wed Sep 25 08:59:08 2013, vsespb wrote:
Well, this probably half-measure. |
From victor@vsespb.rusometimes perl emits useful warnings: use strict; but sometimes - no: use strict; use strict; use strict; On Sun Sep 29 09:15:35 2013, vsespb wrote:
|
Migrated from rt.perl.org#119987 (status was 'open')
Searchable as RT119987$
The text was updated successfully, but these errors were encountered: