-
Notifications
You must be signed in to change notification settings - Fork 542
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
"use" not allowed in expression #16791
Comments
From Ulrich.Windl@rz.uni-regensburg.deThis is a feature request: However this is allowed: I consider both equivalent, with the first (without the surrounding braces) being more elegant. Is there a reason why the first variant does not work? Regards, |
From @AbigailOn Wed, Dec 19, 2018 at 02:28:06AM -0800, Ulrich Windl (via RT) wrote:
The problem is that if perl sees 'map {' it has to guess what is coming Having said that, I am unable to reproduce your issue: $ /opt/perl/5.29.6/bin/perl5.29.6 -c But in general, you can help perl determine whether you have 'map EXPR', map {+... # Start of map ANONHASHREF, LIST Abigail |
The RT System itself - Status changed from 'new' to 'open' |
From @sisyphusOn Wed, 19 Dec 2018 08:10:35 -0800, abigail@abigail.be wrote:
Yes, on Windows I had to go back to perl-5.20 to reproduce the reported behaviour. Cheers, |
From Ulrich.Windl@rz.uni-regensburg.deI can confirm that putting a ';' at the start of the block, prevents the ``"use" not allowed in expression'' error (in my older version of Perl), but I'm unsure about the '+': The plus has to be added in front of an expression (like "+1;", I guess. But in that case an empty statement (';') is much simpler... As the most recent version of Perl seems smarter anyway, your resolved my feature request even before you knew it ;-) Ok to close it! |
From @jkeenanOn Thu, 20 Dec 2018 08:27:55 GMT, Ulrich.Windl@rz.uni-regensburg.de wrote:
Per OP, new feature not needed. Closing ticket. Thank you very much. -- |
@jkeenan - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#133732 (status was 'rejected')
Searchable as RT133732$
The text was updated successfully, but these errors were encountered: