From 808cb9e98625e89abe4e21e243670aa46c12c5d3 Mon Sep 17 00:00:00 2001 From: Norman Koch Date: Sat, 31 May 2014 03:31:29 +0200 Subject: [PATCH] Clarify "require <>"-message. Changed "<> should be quotes" to "<> at require-statement should be quotes". This way, when someone writes "require ", it is way easier to find the specific command that caused this. --- AUTHORS | 1 + pod/perldiag.pod | 2 +- t/op/require_errors.t | 2 +- toke.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 0ff31c1cae22..fd619b053569 100644 --- a/AUTHORS +++ b/AUTHORS @@ -875,6 +875,7 @@ Nobuhiro Iwamatsu Noirin Shirley Norbert Pueschel Norio Suzuki +Norman Koch Norton T. Allen Nuno Carvalho Offer Kaye diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 0ccf5fb20dd9..848b1d562da3 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -5019,7 +5019,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 >> when you should have written C. diff --git a/t/op/require_errors.t b/t/op/require_errors.t index ec7a12261d72..a152d2daf6ca 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 '; -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 ec55fbe7a04f..692ab1189a9f 100644 --- a/toke.c +++ b/toke.c @@ -8509,7 +8509,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;