t/pragma/strict-vars Tests of "use strict 'vars'" for strict.t
t/pragma/strict.t See if strictures work
t/pragma/subs.t See if subroutine pseudo-importation works
+t/pragma/utf8.t See if utf8 operations work
t/pragma/warn/1global Tests of global warnings for warning.t
t/pragma/warn/2use Tests for "use warning" for warning.t
t/pragma/warn/3both Tests for interaction of $^W and "use warning"
(F) You tried to divide a number by 0 to get the remainder. Most numbers
don't take to this kindly.
-=item Illegal octal digit
+=item Illegal binary digit %s
+
+(F) You used a digit other than 0 and 1 in a binary number.
+
+=item Illegal octal digit %s
(F) You used an 8 or 9 in a octal number.
-=item Illegal octal digit ignored
+=item Illegal binary digit %s ignored
+
+(W) You may have tried to use a digit other than 0 or 1 in a binary number.
+Interpretation of the binary number stopped before the offending digit.
+
+=item Illegal octal digit %s ignored
(W) You may have tried to use an 8 or 9 in a octal number. Interpretation
of the octal number stopped before the 8 or 9.
-=item Illegal hex digit ignored
+=item Illegal hex digit %s ignored
(W) You may have tried to use a character other than 0 - 9 or A - F in a
hexadecimal number. Interpretation of the hexadecimal number stopped
operator, but you can use it directly. The C<qx/EXPR/>
operator is discussed in more detail in L<perlop/"I/O Operators">.
-=item recv SOCKET,SCALAR,LEN,FLAGS
+=item recv SOCKET,SCALAR,LENGTH,FLAGS
Receives a message on a socket. Attempts to receive LENGTH bytes of
data into variable SCALAR from the specified SOCKET filehandle.
use warning 'octal' ;
my $a = oct "029" ;
EXPECT
-Illegal octal digit ignored at - line 3.
+Illegal octal digit '9' ignored at - line 3.
########
# util.c
use warning 'unsafe' ;
*a = hex "0xv9" ;
EXPECT
-Illegal hex digit ignored at - line 3.
+Illegal hex digit 'v' ignored at - line 3.
########
# util.c
use warning 'unsafe' ;
*a = oct "0b9" ;
EXPECT
-Illegal binary digit ignored at - line 3.
+Illegal binary digit '9' ignored at - line 3.
/* 8 and 9 are not octal */
case '8': case '9':
if (shift == 3)
- yyerror("Illegal octal digit");
+ yyerror(form("Illegal octal digit '%c'", *s));
else
if (shift == 1)
- yyerror("Illegal binary digit");
+ yyerror(form("Illegal binary digit '%c'", *s));
/* FALL THROUGH */
/* octal digits */
case '2': case '3': case '4':
case '5': case '6': case '7':
if (shift == 1)
- yyerror("Illegal binary digit");
+ yyerror(form("Illegal binary digit '%c'", *s));
/* FALL THROUGH */
case '0': case '1':
if (len && (*s >= '2' || *s <= '9')) {
dTHR;
if (ckWARN(WARN_UNSAFE))
- warner(WARN_UNSAFE, "Illegal binary digit ignored");
+ warner(WARN_UNSAFE, "Illegal binary digit '%c' ignored", *s);
}
*retlen = s - start;
return retval;
if (len && (*s == '8' || *s == '9')) {
dTHR;
if (ckWARN(WARN_OCTAL))
- warner(WARN_OCTAL, "Illegal octal digit ignored");
+ warner(WARN_OCTAL, "Illegal octal digit '%c' ignored", *s);
}
*retlen = s - start;
return retval;
dTHR;
--s;
if (ckWARN(WARN_UNSAFE))
- warner(WARN_UNSAFE,"Illegal hex digit ignored");
+ warner(WARN_UNSAFE,"Illegal hex digit '%c' ignored", *s);
break;
}
}