summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gv.c2
-rw-r--r--op.c8
-rw-r--r--pod/perldelta.pod4
-rw-r--r--pod/perldiag.pod14
-rw-r--r--pp_ctl.c19
-rwxr-xr-xt/comp/use.t2
-rw-r--r--t/pragma/strict-vars2
-rw-r--r--t/pragma/warn/op14
-rw-r--r--t/pragma/warn/pp_hot4
-rw-r--r--t/pragma/warn/pp_sys28
-rw-r--r--toke.c2
-rw-r--r--universal.c4
-rw-r--r--util.c2
13 files changed, 58 insertions, 47 deletions
diff --git a/gv.c b/gv.c
index eaf2ab11f6..be1935560e 100644
--- a/gv.c
+++ b/gv.c
@@ -631,7 +631,7 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
sv_type == SVt_PVHV ? '%' : '$',
name);
if (GvCVu(*gvp))
- Perl_warn(aTHX_ "(Did you mean &%s instead?)\n", name);
+ Perl_warn(aTHX_ "\t(Did you mean &%s instead?)\n", name);
stash = 0;
}
}
diff --git a/op.c b/op.c
index 3d5512683b..1cfc6dde2a 100644
--- a/op.c
+++ b/op.c
@@ -168,7 +168,7 @@ Perl_pad_allocmy(pTHX_ char *name)
Perl_warner(aTHX_ WARN_MISC,
"\"our\" variable %s redeclared", name);
Perl_warner(aTHX_ WARN_MISC,
- "(Did you mean \"local\" instead of \"our\"?)\n");
+ "\t(Did you mean \"local\" instead of \"our\"?)\n");
break;
}
} while ( off-- > 0 );
@@ -5711,7 +5711,7 @@ Perl_ck_defined(pTHX_ OP *o) /* 19990527 MJD */
Perl_warner(aTHX_ WARN_DEPRECATED,
"defined(@array) is deprecated");
Perl_warner(aTHX_ WARN_DEPRECATED,
- "(Maybe you should just omit the defined()?)\n");
+ "\t(Maybe you should just omit the defined()?)\n");
break;
case OP_RV2HV:
break; /* Globals via GV can be undef */
@@ -5719,7 +5719,7 @@ Perl_ck_defined(pTHX_ OP *o) /* 19990527 MJD */
Perl_warner(aTHX_ WARN_DEPRECATED,
"defined(%%hash) is deprecated");
Perl_warner(aTHX_ WARN_DEPRECATED,
- "(Maybe you should just omit the defined()?)\n");
+ "\t(Maybe you should just omit the defined()?)\n");
break;
default:
/* no warning */
@@ -6562,7 +6562,7 @@ Perl_peep(pTHX_ register OP *o)
Perl_warner(aTHX_ WARN_EXEC,
"Statement unlikely to be reached");
Perl_warner(aTHX_ WARN_EXEC,
- "(Maybe you meant system() when you said exec()?)\n");
+ "\t(Maybe you meant system() when you said exec()?)\n");
CopLINE_set(PL_curcop, oldline);
}
}
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 680bcb76e4..3ee5f1b0d6 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -2079,7 +2079,7 @@ That name might have a meaning to Perl itself some day, even though it
doesn't yet. Perhaps you should use a mixed-case attribute name, instead.
See L<attributes>.
-=item (in cleanup) %s
+=item (in cleanup) %s
(W misc) This prefix usually indicates that a DESTROY() method raised
the indicated exception. Since destructors are usually called by
@@ -2247,7 +2247,7 @@ just use C<if (%hash) { # not empty }> for example.
See Server error.
-=item Did you mean "local" instead of "our"?
+=item (Did you mean "local" instead of "our"?)
(W misc) Remember that "our" does not localize the declared global variable.
You have declared it again in the same lexical scope, which seems superfluous.
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index a988124b5b..7e41e538e3 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -248,7 +248,7 @@ Perl yourself.
instead of Perl. Check the #! line, or manually feed your script
into Perl yourself.
-=item (in cleanup) %s
+=item (in cleanup) %s
(W misc) This prefix usually indicates that a DESTROY() method raised
the indicated exception. Since destructors are usually called by
@@ -260,7 +260,7 @@ repeated.
Failure of user callbacks dispatched using the C<G_KEEPERR> flag
could also result in this warning. See L<perlcall/G_KEEPERR>.
-=item (Missing semicolon on previous line?)
+=item (Missing semicolon on previous line?)
(S) This is an educated guess made in conjunction with the message "%s
found where operator expected". Don't automatically put a semicolon on
@@ -1313,16 +1313,16 @@ twisted to write code that triggers this error.
See Server error.
-=item Did you mean &%s instead?
+=item (Did you mean &%s instead?)
(W) You probably referred to an imported subroutine &FOO as $FOO or some such.
-=item Did you mean "local" instead of "our"?
+=item (Did you mean "local" instead of "our"?)
(W misc) Remember that "our" does not localize the declared global variable.
You have declared it again in the same lexical scope, which seems superfluous.
-=item Did you mean $ or @ instead of %?
+=item (Did you mean $ or @ instead of %?)
(W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
On the other hand, maybe you just meant %hash and got carried away.
@@ -1332,7 +1332,7 @@ On the other hand, maybe you just meant %hash and got carried away.
(F) You passed die() an empty string (the equivalent of C<die "">) or
you called it with no args and both C<$@> and C<$_> were empty.
-=item Do you need to predeclare %s?
+=item (Do you need to predeclare %s?)
(S) This is an educated guess made in conjunction with the message "%s
found where operator expected". It often means a subroutine or module
@@ -1867,7 +1867,7 @@ double-quotish context.
(W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
construction, but the command was missing or blank.
-=item Missing operator before %s?
+=item (Missing operator before %s?)
(S) This is an educated guess made in conjunction with the message "%s
found where operator expected". Often the missing operator is a comma.
diff --git a/pp_ctl.c b/pp_ctl.c
index 00fa47673a..acbcc7e72f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2937,7 +2937,7 @@ PP(pp_require)
|| (PERL_VERSION == ver
&& PERL_SUBVERSION < sver))))
{
- DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only version "
+ DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only "
"v%d.%d.%d, stopped", rev, ver, sver, PERL_REVISION,
PERL_VERSION, PERL_SUBVERSION);
}
@@ -2954,9 +2954,20 @@ PP(pp_require)
NV nsver = (nver - ver) * 1000;
UV sver = (UV)(nsver + 0.0009);
- DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only version "
- "v%d.%d.%d, stopped", rev, ver, sver, PERL_REVISION,
- PERL_VERSION, PERL_SUBVERSION);
+ /* help out with the "use 5.6" confusion */
+ if (sver == 0 && (rev > 5 || (rev == 5 && ver >= 100))) {
+ DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--"
+ "this is only v%d.%d.%d, stopped"
+ " (did you mean v%"UVuf".%"UVuf".0?)",
+ rev, ver, sver, PERL_REVISION, PERL_VERSION,
+ PERL_SUBVERSION, rev, ver/100);
+ }
+ else {
+ DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--"
+ "this is only v%d.%d.%d, stopped",
+ rev, ver, sver, PERL_REVISION, PERL_VERSION,
+ PERL_SUBVERSION);
+ }
}
}
RETPUSHYES;
diff --git a/t/comp/use.t b/t/comp/use.t
index 89cb31a568..1f5fae39a2 100755
--- a/t/comp/use.t
+++ b/t/comp/use.t
@@ -153,7 +153,7 @@ print "ok ",$i++,"\n";
print "ok ",$i++,"\n";
eval "use lib v100.105";
- unless ($@ =~ /lib version v100\.105 required--this is only version v35\.36/) {
+ unless ($@ =~ /lib v100\.105 required--this is only v35\.36/) {
print "not ";
}
print "ok ",$i++,"\n";
diff --git a/t/pragma/strict-vars b/t/pragma/strict-vars
index 3d98c54764..ae09742fab 100644
--- a/t/pragma/strict-vars
+++ b/t/pragma/strict-vars
@@ -395,5 +395,5 @@ our $foo;
}
EXPECT
"our" variable $foo redeclared at - line 7.
-(Did you mean "local" instead of "our"?)
+ (Did you mean "local" instead of "our"?)
Name "Foo::foo" used only once: possible typo at - line 9.
diff --git a/t/pragma/warn/op b/t/pragma/warn/op
index 461f3f618b..1a79b4ad23 100644
--- a/t/pragma/warn/op
+++ b/t/pragma/warn/op
@@ -84,16 +84,16 @@
keys joe ;
Statement unlikely to be reached
- (Maybe you meant system() when you said exec()?
+ (Maybe you meant system() when you said exec()?
exec "true" ; my $a
defined(@array) is deprecated
- (Maybe you should just omit the defined()?)
+ (Maybe you should just omit the defined()?)
my @a ; defined @a ;
defined (@a = (1,2,3)) ;
defined(%hash) is deprecated
- (Maybe you should just omit the defined()?)
+ (Maybe you should just omit the defined()?)
my %h ; defined %h ;
/---/ should probably be written as "---"
@@ -738,28 +738,28 @@ exec "$^X -e 1" ;
my $a
EXPECT
Statement unlikely to be reached at - line 4.
-(Maybe you meant system() when you said exec()?)
+ (Maybe you meant system() when you said exec()?)
########
# op.c
use warnings 'deprecated' ;
my @a; defined(@a);
EXPECT
defined(@array) is deprecated at - line 3.
-(Maybe you should just omit the defined()?)
+ (Maybe you should just omit the defined()?)
########
# op.c
use warnings 'deprecated' ;
defined(@a = (1,2,3));
EXPECT
defined(@array) is deprecated at - line 3.
-(Maybe you should just omit the defined()?)
+ (Maybe you should just omit the defined()?)
########
# op.c
use warnings 'deprecated' ;
my %h; defined(%h);
EXPECT
defined(%hash) is deprecated at - line 3.
-(Maybe you should just omit the defined()?)
+ (Maybe you should just omit the defined()?)
########
# op.c
no warnings 'syntax' ;
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot
index baa9f1f3e2..275905749e 100644
--- a/t/pragma/warn/pp_hot
+++ b/t/pragma/warn/pp_hot
@@ -92,7 +92,7 @@ print STDIN "anc";
EXPECT
print() on closed filehandle main::STDIN at - line 4.
print() on closed filehandle main::STDIN at - line 6.
-(Are you trying to call print() on dirhandle main::STDIN?)
+ (Are you trying to call print() on dirhandle main::STDIN?)
########
# pp_hot.c [pp_rv2av]
use warnings 'uninitialized' ;
@@ -139,7 +139,7 @@ $a = <STDIN> ;
EXPECT
readline() on closed filehandle main::STDIN at - line 3.
readline() on closed filehandle main::STDIN at - line 4.
-(Are you trying to call readline() on dirhandle main::STDIN?)
+ (Are you trying to call readline() on dirhandle main::STDIN?)
########
# pp_hot.c [Perl_do_readline]
use warnings 'io' ;
diff --git a/t/pragma/warn/pp_sys b/t/pragma/warn/pp_sys
index d428344c86..7c38727e28 100644
--- a/t/pragma/warn/pp_sys
+++ b/t/pragma/warn/pp_sys
@@ -125,7 +125,7 @@ write STDIN;
EXPECT
write() on closed filehandle main::STDIN at - line 6.
write() on closed filehandle main::STDIN at - line 8.
-(Are you trying to call write() on dirhandle main::STDIN?)
+ (Are you trying to call write() on dirhandle main::STDIN?)
########
# pp_sys.c [pp_leavewrite]
use warnings 'io' ;
@@ -168,7 +168,7 @@ printf STDIN "fred";
EXPECT
printf() on closed filehandle main::STDIN at - line 4.
printf() on closed filehandle main::STDIN at - line 6.
-(Are you trying to call printf() on dirhandle main::STDIN?)
+ (Are you trying to call printf() on dirhandle main::STDIN?)
########
# pp_sys.c [pp_prtf]
use warnings 'io' ;
@@ -192,7 +192,7 @@ syswrite STDIN, "fred", 1;
EXPECT
syswrite() on closed filehandle main::STDIN at - line 4.
syswrite() on closed filehandle main::STDIN at - line 6.
-(Are you trying to call syswrite() on dirhandle main::STDIN?)
+ (Are you trying to call syswrite() on dirhandle main::STDIN?)
########
# pp_sys.c [pp_flock]
use Config;
@@ -217,7 +217,7 @@ flock STDIN, 8;
EXPECT
flock() on closed filehandle main::STDIN at - line 14.
flock() on closed filehandle main::STDIN at - line 16.
-(Are you trying to call flock() on dirhandle main::STDIN?)
+ (Are you trying to call flock() on dirhandle main::STDIN?)
########
# pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername]
use warnings 'io' ;
@@ -296,25 +296,25 @@ getsockopt() on closed socket main::STDIN at - line 29.
getsockname() on closed socket main::STDIN at - line 30.
getpeername() on closed socket main::STDIN at - line 31.
send() on closed socket main::STDIN at - line 33.
-(Are you trying to call send() on dirhandle main::STDIN?)
+ (Are you trying to call send() on dirhandle main::STDIN?)
bind() on closed socket main::STDIN at - line 34.
-(Are you trying to call bind() on dirhandle main::STDIN?)
+ (Are you trying to call bind() on dirhandle main::STDIN?)
connect() on closed socket main::STDIN at - line 35.
-(Are you trying to call connect() on dirhandle main::STDIN?)
+ (Are you trying to call connect() on dirhandle main::STDIN?)
listen() on closed socket main::STDIN at - line 36.
-(Are you trying to call listen() on dirhandle main::STDIN?)
+ (Are you trying to call listen() on dirhandle main::STDIN?)
accept() on closed socket main::STDIN at - line 37.
-(Are you trying to call accept() on dirhandle main::STDIN?)
+ (Are you trying to call accept() on dirhandle main::STDIN?)
shutdown() on closed socket main::STDIN at - line 38.
-(Are you trying to call shutdown() on dirhandle main::STDIN?)
+ (Are you trying to call shutdown() on dirhandle main::STDIN?)
setsockopt() on closed socket main::STDIN at - line 39.
-(Are you trying to call setsockopt() on dirhandle main::STDIN?)
+ (Are you trying to call setsockopt() on dirhandle main::STDIN?)
getsockopt() on closed socket main::STDIN at - line 40.
-(Are you trying to call getsockopt() on dirhandle main::STDIN?)
+ (Are you trying to call getsockopt() on dirhandle main::STDIN?)
getsockname() on closed socket main::STDIN at - line 41.
-(Are you trying to call getsockname() on dirhandle main::STDIN?)
+ (Are you trying to call getsockname() on dirhandle main::STDIN?)
getpeername() on closed socket main::STDIN at - line 42.
-(Are you trying to call getpeername() on dirhandle main::STDIN?)
+ (Are you trying to call getpeername() on dirhandle main::STDIN?)
########
# pp_sys.c [pp_stat]
use warnings 'newline' ;
diff --git a/toke.c b/toke.c
index 375d91738a..48dad64e93 100644
--- a/toke.c
+++ b/toke.c
@@ -2647,7 +2647,7 @@ Perl_yylex(pTHX)
#ifdef PERL_STRICT_CR
Perl_warn(aTHX_ "Illegal character \\%03o (carriage return)", '\r');
Perl_croak(aTHX_
- "(Maybe you didn't strip carriage returns after a network transfer?)\n");
+ "\t(Maybe you didn't strip carriage returns after a network transfer?)\n");
#endif
case ' ': case '\t': case '\f': case 013:
s++;
diff --git a/universal.c b/universal.c
index 28e08969b4..686d9f8610 100644
--- a/universal.c
+++ b/universal.c
@@ -246,8 +246,8 @@ XS(XS_UNIVERSAL_VERSION)
/* they said C<use Foo v1.2.3> and $Foo::VERSION
* doesn't look like a float: do string compare */
if (sv_cmp(req,sv) == 1) {
- Perl_croak(aTHX_ "%s version v%vd required--"
- "this is only version v%vd",
+ Perl_croak(aTHX_ "%s v%vd required--"
+ "this is only v%vd",
HvNAME(pkg), req, sv);
}
goto finish;
diff --git a/util.c b/util.c
index 4b0e1c57aa..bda2beb092 100644
--- a/util.c
+++ b/util.c
@@ -3817,6 +3817,6 @@ Perl_report_closed_fh(pTHX_ GV *gv, IO *io, const char *func, const char *obj)
if (io && IoDIRP(io))
Perl_warner(aTHX_ WARN_CLOSED,
- "(Are you trying to call %s() on dirhandle %s?)\n",
+ "\t(Are you trying to call %s() on dirhandle %s?)\n",
func, name);
}