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;
}
}
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 );
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 */
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 */
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);
}
}
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
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.
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
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
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.
(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
(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.
|| (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);
}
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;
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";
}
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.
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 "---"
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' ;
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' ;
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' ;
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' ;
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' ;
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;
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' ;
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' ;
#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++;
/* 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;
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);
}