# New Ticket Created by Ricardo SIGNES # Please include the string: [perl #121331] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=121331 > I 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 From: Norman Koch <kochnorman@rocketmail.com> To: perl5-porters@perl.org Subject: [PATCH] Clearified "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 ----- End forwarded message ----- -- rjbs