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
[PATCH] Clarified "require <>"-message #13624
Comments
From @rjbsI wanted to get this into RT for likely application early in the 5.21 series. ----- Forwarded message from Norman Koch <kochnorman@rocketmail.com> ----- Date: Sat, 4 May 2013 23:18:31 +0200 Changed "<> should be quotes" to pod/perldiag.pod | 2 +- Inline Patchdiff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 3d8212e..81c36be 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4716,7 +4716,7 @@ L<perlfunc/setsockopt>.
interpreted as the != (numeric not equal) and ~ (1's complement)
operators: probably not what you intended.
-=item <> should be quotes
+=item <> at require-statement should be quotes
(F) You wrote C<< require <file> >> when you should have written
C<require 'file'>.
diff --git a/t/op/require_errors.t b/t/op/require_errors.t
index e323948..56bacf6 100644
--- a/t/op/require_errors.t
+++ b/t/op/require_errors.t
@@ -55,7 +55,7 @@ for my $file ("$nonfile.ph", ".ph") {
}
eval 'require <foom>';
-like $@, qr/^<> should be quotes at /, 'require <> error';
+like $@, qr/^<> at require-statement should be quotes at /, 'require <> error';
my $module = tempfile();
my $mod_file = "$module.pm";
diff --git a/toke.c b/toke.c
index 08e9c4d..7d29074 100644
--- a/toke.c
+++ b/toke.c
@@ -8287,7 +8287,7 @@ Perl_yylex(pTHX)
gv_stashpvn(PL_tokenbuf, strlen(PL_tokenbuf),
GV_ADD | (UTF ? SVf_UTF8 : 0));
else if (*s == '<')
- yyerror("<> should be quotes");
+ yyerror("<> at require-statement should be quotes");
}
if (orig_keyword == KEY_require) {
orig_keyword = 0;
--
----- End forwarded message ----- -- |
From @jkeenanI've taken the inline patch and put it in an attachment that I think can be applied with 'git am' once we're ready to do so. Thank you very much. |
From @jkeenan121331_require_warning.diffDate: Sat, 4 May 2013 23:18:31 +0200
From: Norman Koch <kochnorman@rocketmail.com>
To: perl5-porters@perl.org
Subject: [PATCH] Clarified "require <>"-message
List-Id: <perl5-porters.perl.org>
Changed "<> should be quotes" to
"<> at require-statement should be quotes" when someone
writes "require <Module>", because this way it is way
easier to find the specific command that caused this.
---
pod/perldiag.pod | 2 +-
t/op/require_errors.t | 2 +-
toke.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 3d8212e..81c36be 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4716,7 +4716,7 @@ L<perlfunc/setsockopt>.
interpreted as the != (numeric not equal) and ~ (1's complement)
operators: probably not what you intended.
-=item <> should be quotes
+=item <> at require-statement should be quotes
(F) You wrote C<< require <file> >> when you should have written
C<require 'file'>.
diff --git a/t/op/require_errors.t b/t/op/require_errors.t
index e323948..56bacf6 100644
--- a/t/op/require_errors.t
+++ b/t/op/require_errors.t
@@ -55,7 +55,7 @@ for my $file ("$nonfile.ph", ".ph") {
}
eval 'require <foom>';
-like $@, qr/^<> should be quotes at /, 'require <> error';
+like $@, qr/^<> at require-statement should be quotes at /, 'require <> error';
my $module = tempfile();
my $mod_file = "$module.pm";
diff --git a/toke.c b/toke.c
index 08e9c4d..7d29074 100644
--- a/toke.c
+++ b/toke.c
@@ -8287,7 +8287,7 @@ Perl_yylex(pTHX)
gv_stashpvn(PL_tokenbuf, strlen(PL_tokenbuf),
GV_ADD | (UTF ? SVf_UTF8 : 0));
else if (*s == '<')
- yyerror("<> should be quotes");
+ yyerror("<> at require-statement should be quotes");
}
if (orig_keyword == KEY_require) {
orig_keyword = 0;
--
1.7.10.4
|
From @jkeenanOn Mon May 19 15:53:56 2014, jkeenan wrote:
Correction! In order to welcome Norman Koch to membership in the AUTHORS of Perl 5, we'll have to update the AUTHORS file as well. Please only use the "2nd" patch. Thank you very much. |
From @jkeenan121331_2nd_require_warning.diffdiff --git a/AUTHORS b/AUTHORS
index 2fb096e..d06e141 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -873,6 +873,7 @@ Nobuhiro Iwamatsu
Noirin Shirley <colmsbook@nerdchic.net>
Norbert Pueschel <pueschel@imsdd.meb.uni-bonn.de>
Norio Suzuki <kipp@shonanblue.ne.jp>
+Norman Koch <kochnorman@rocketmail.com>
Norton T. Allen <allen@huarp.harvard.edu>
Nuno Carvalho <mestre.smash@gmail.com>
Offer Kaye <offer.kaye@gmail.com>
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index f87ca9c..aad0bb6 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -5017,7 +5017,7 @@ take the risk of using this feature, simply disable this warning:
interpreted as the != (numeric not equal) and ~ (1's complement)
operators: probably not what you intended.
-=item <> should be quotes
+=item <> at require-statement should be quotes
(F) You wrote C<< require <file> >> when you should have written
C<require 'file'>.
diff --git a/t/op/require_errors.t b/t/op/require_errors.t
index ec7a122..a152d2d 100644
--- a/t/op/require_errors.t
+++ b/t/op/require_errors.t
@@ -55,7 +55,7 @@ for my $file ("$nonfile.ph", ".ph") {
}
eval 'require <foom>';
-like $@, qr/^<> should be quotes at /, 'require <> error';
+like $@, qr/^<> at require-statement should be quotes at /, 'require <> error';
my $module = tempfile();
my $mod_file = "$module.pm";
diff --git a/toke.c b/toke.c
index ea88183..178b1ee 100644
--- a/toke.c
+++ b/toke.c
@@ -8484,7 +8484,7 @@ Perl_yylex(pTHX)
gv_stashpvn(PL_tokenbuf, strlen(PL_tokenbuf),
GV_ADD | (UTF ? SVf_UTF8 : 0));
else if (*s == '<')
- yyerror("<> should be quotes");
+ yyerror("<> at require-statement should be quotes");
}
if (orig_keyword == KEY_require) {
orig_keyword = 0;
|
The RT System itself - Status changed from 'new' to 'open' |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#121331 (status was 'resolved')
Searchable as RT121331$
The text was updated successfully, but these errors were encountered: