Skip to content

Commit

Permalink
Clarify "require <>"-message.
Browse files Browse the repository at this point in the history
Changed "<> should be quotes" to "<> at require-statement should be
quotes".  This way, when someone writes "require <Module>", it is way
easier to find the specific command that caused this.
  • Loading branch information
nokoch authored and jkeenan committed May 31, 2014
1 parent 2fe8fc1 commit 808cb9e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -875,6 +875,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>
Expand Down
2 changes: 1 addition & 1 deletion pod/perldiag.pod
Expand Up @@ -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 <file> >> when you should have written
C<require 'file'>.
Expand Down
2 changes: 1 addition & 1 deletion t/op/require_errors.t
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion toke.c
Expand Up @@ -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;
Expand Down

0 comments on commit 808cb9e

Please sign in to comment.