develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #121916] error message escapes eval

From:
Tony Cook via RT
Date:
October 8, 2014 04:13
Subject:
[perl #121916] error message escapes eval
Message ID:
rt-4.0.18-18638-1412741615-343.121916-15-0@perl.org
On Mon May 19 03:41:28 2014, sfandino@gmail.com wrote:
> $ perl -e 'eval q|foo"|'
> String found where operator expected at (eval 1) line 1, at end of
> line
>         (Missing semicolon on previous line?)
> 
> 
> $ perl -e 'eval q|foo"|; print $@'
> String found where operator expected at (eval 1) line 1, at end of
> line
>         (Missing semicolon on previous line?)
> Can't find string terminator '"' anywhere before EOF at (eval 1) line
> 1.
> 
> 
> The "String found..." error shouldn't be generated from inside the
> eval.
> 
> This bug may be related to #121915.

This is a warning:

tony@mars:.../git/perl2$ ./perl -Ilib -e 'eval q|foo"|'
String found where operator expected at (eval 1) line 1, at end of line
        (Missing semicolon on previous line?)
tony@mars:.../git/perl2$ ./perl -Ilib -e 'no warnings; eval q|foo"|'
tony@mars:.../git/perl2$ 

and eval doesn't suppress warnings.

Rejecting.

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=121916



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About