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
please undeprecate doublequoting default for heredoc string terminator #9768
Comments
From @davidnicolCreated by @davidnicolThat without explicit quotes around the here-string terminator, Please undeprecate this useful feature. Perl Info
|
From @rgs2009/6/18 David Nicol <perlbug-followup@perl.org>:
I wasn't aware it was deprecated. It doesn't throw a deprecation |
The RT System itself - Status changed from 'new' to 'open' |
From @davidnicolOn Thu, Jun 18, 2009 at 5:26 AM, Rafael
Oh. I seem to have misinterpreted either someone's straw man or the Use of bare << to mean <<"" is deprecated at - line 1. I'm not certain what the various parts of the here document syntax |
From @ikegamiOn Fri, Jun 19, 2009 at 2:09 PM, David Nicol <davidnicol@gmail.com> wrote:
A bare << is a syntax error. Quote perlop: "The terminating string may be either an identifier (a word), or some quoted That's probably why it's deprecated. It's not recent either. It's been - Eric "ikegami" Brine |
From @davidnicol
"removing" the deprecated "feature" would require identifying the Inline Patchdiff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index e5ca400..2360042 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -141,14 +141,14 @@ Use of comma-less variable list is deprecated at - line 5.
Use of comma-less variable list is deprecated at - line 5.
########
# toke.c
-use warnings 'deprecated' ;
+use warnings 'syntax' ;
$a = <<;
-no warnings 'deprecated' ;
+no warnings 'syntax' ;
$a = <<;
EXPECT
-Use of bare << to mean <<"" is deprecated at - line 3.
+bare << meaning <<"" may be confusing at - line 3.
########
# toke.c
use warnings 'syntax' ;
diff --git a/toke.c b/toke.c
index e0afa13..24c28c5 100644
--- a/toke.c
+++ b/toke.c
@@ -11286,8 +11286,9 @@ S_scan_heredoc(pTHX_ register char *s)
s++, term = '\'';
else
term = '"';
- if (!isALNUM_lazy_if(s,UTF))
- deprecate_old("bare << to mean <<\"\"");
+ if (!isALNUM_lazy_if(s,UTF) && ckWARN(WARN_SYNTAX))
+ Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
+ "bare << meaning <<\"\" may be confusing");
for (; isALNUM_lazy_if(s,UTF); s++) {
if (d < e)
*d++ = *s; |
From @schwernDavid Nicol wrote:
I understand your concern about breaking code, what's the point of having a 4633a7c (Larry Wall 1995-11-21 10:01:00 +1200 6448) You know what version of Perl that's from? 5.002 BETA! Give the deprecation warnings some teeth. Make it a straight up syntax error. -- |
@rgs - Status changed from 'open' to 'rejected' |
From @davidnicolOn Sat, Jun 20, 2009 at 2:40 PM, Michael G Schwern<schwern@pobox.com> wrote:
You realize that making that a syntax error implies editing t/base/lex.t, right? How about acknowledging that after fourteen years on death row without |
From @cpansproutOn Tue Jun 23 20:37:15 2009, davidnicol@gmail.com wrote:
I used to used << all the time, and then deprecation warnings became the I’m going to re-open this with the hope that we can undeprecate it. -- Father Chrysostomos |
@cpansprout - Status changed from 'rejected' to 'open' |
@cpansprout - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#66686 (status was 'rejected')
Searchable as RT66686$
The text was updated successfully, but these errors were encountered: