(W) A warning (optional). (D) A deprecation (optional). (S) A severe warning (mandatory). (F) A fatal error (trappable). (P) An internal error you should never see (trappable). (X) A very fatal error (nontrappable). (A) An alien error message (not generated by Perl).
Optional warnings are enabled by using the -w switch. Warnings may be captured by setting $SIG{__WARN__}
to a reference to a routine that will be called on each warning instead of
printing it. See the perlvar manpage. Trappable errors may be trapped using the eval operator. See
eval.
Some of these messages are generic. Spots that vary are denoted with a %s,
just as in a printf format. Note that some messages start with a %s! The
symbols "%-?@
sort before the letters, while [
and \
sort after.
local()
if you want to localize a package variable.
exists()
must be a hash element, such as
$foo{$bar} $ref->[12]->{"susie"}
delete()
must be either a hash element,
such as
$foo{$bar} $ref->[12]->{"susie"}
or a hash slice, such as
@foo{$bar, $baz, $xyzzy} @{$ref->[12]}{"susie", "queue"}
perl -c
fails.
perl -c
succeeds.
socket()
call? See accept.
msgsnd()
requires a string at least as long as
sizeof(long).
-w -U
into -wU
.
free_tmps()
routine. This indicates that something else is
freeing the SV before the free_tmps()
routine gets a chance,
which means that the free_tmps()
routine will be freeing an
unreferenced scalar when it does try to free it.
SvREFCNT_dec()
was called too many times, or
that SvREFCNT_inc()
was called too few times, or that the SV
was mortalized when it shouldn't have been, or that memory has been
corrupted.
substr()
used as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See substr.
msgctl(),
semctl()
or shmctl().
In C parlance, the correct
sizes are, respectively,
sizeof(struct msqid_ds *), sizeof(struct semid_ds *), and
sizeof(struct shmid_ds *).
open(),
or did it in another package.
free()
on something that had
never been malloc()ed
in the first place. Mandatory, but can
be disabled by setting environment variable PERL_BADFREE
to 1.
This message can be quite often seen with DB_File on systems with ``hard''
dynamic linking, like AIX
and OS/2
. It is a bug of
Berkeley DB
which is left unnoticed if DB
uses forgiving
system malloc().
$var = 'myvar'; $sym = mypack::$var;
is not the same as
$var = 'myvar'; $sym = "mypack::$var";
socket()
call? See bind.
perl_call_sv()
exited by calling exit.
sort()
block or subroutine, which is a
no-no. See goto.
sort().
You can usually
double the curlies to get the same effect though, because the inner curlies
will be considered a block that loops once. See last.
sort().
You can usually double the curlies to get the same
effect though, because the inner curlies will be considered a block that
loops once. See next.
sort().
You can usually double the curlies to get the same
effect though, because the inner curlies will be considered a block that
loops once. See redo.
$BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3);
perl -x/foo/bar
, but /foo/bar
is not a directory that you can chdir to, possibly because it doesn't
exist.
*foo += 1;
You CAN say
$foo = *foo; $foo += 1;
but then $foo
no longer contains a glob.
-i.bak
, or some such.
setegid()
call failed for some reason in the setuid
emulator of suidperl.
waitpid()
or
wait4(),
so only waitpid()
without flags is
emulated.
system(),
exec(),
or piped open call could
not execute the named program for the indicated reason. Typical reasons
include: the permissions were wrong on the file, the file wasn't found in $ENV{PATH}
, the executable in question was compiled for another architecture, or the
#! line in a script points to an interpreter that can't be run for similar
reasons. (Or maybe your system doesn't support #! at all.)
print q(The character '(' starts a side comment.)
stat()
routine, because the device
name is overwritten with each call. If this warning appears, the name
lookup failed, and the access checking routine gave up and returned FALSE,
just to be conservative. (Note: The access checking routine knows about the
Perl stat operator and file tests, so you shouldn't ever see this warning in response
to a Perl command; it arises only if some internal code takes stat buffers
lightly.)
$GETSYI
how big you
want your mailbox buffers to be, and didn't get an answer.
local $$ref
, which is not allowed because the compiler can't determine whether $ref will end up pointing to
anything with a symbol table entry, and a symbol table entry is necessary
to do a local.
@ISA
array contained the name of another package that
doesn't seem to exist.
mktemp()
routine failed for some reason while trying
to process a -e switch. Maybe your /tmp partition is full, or clobbered.
substr()
was handed a NULL.
sort { &func } @x
instead of sort func @x
.
setreuid()
call failed for some reason in the setuid
emulator of suidperl.
fstat()
the script even though
you have it open already. Bizarre.
setreuid()
call failed for some reason in the setuid
emulator of suidperl.
$a
and $b
are reserved
for sort comparisons. You mentioned $a
or $b
in
the same line as the <=> or cmp operator, and the variable had earlier been declared as a lexical
variable. Either qualify the sort variable with the package name, or rename
the lexical variable.
ref()
function
to test the type of the reference, if need be.
SCALAR(0xdecaf).
Use the
$1
form instead.
???
, this is an internal error.
chmod 777, $filename
not realizing that 777 will be interpreted as a decimal number, equivalent to 01411. Octal constants are introduced with a leading 0 in Perl, as in C.
socket()
call? See connect.
<<FOO
, the label
FOO
is too long for Perl to handle. You have to be seriously twisted to write
code that triggers this error.
&FOO
as
$FOO
or some such.
%hash
and got carried away.
die()
an empty string (the equivalent of die "") or you called it with no args and both $@
and $_
were empty.
safemalloc()
instead.
free()
on something that had
already been freed.
glob()
operator, or put the filenames into a
variable and glob that.
fcntl().
What is
this, a PDP-11 or something?
open()
or a
socket()
call, or call a constructor from the FileHandle
package.
{ local $^W = 0; eval "format NAME =..."; }
if ($foo = 123)
when you meant
if ($foo == 123)
(or something like that).
gethostent(),
probably because if it did, it'd feel morally obligated to return every
hostname on the Internet.
socket()
call?
sys$getuai
underlying the
getpwnam operator returned an invalid UIC.
$A::B
). You've exceeded Perl's limits. Future versions of Perl are likely to
eliminate these arbitrary limitations.
%ENV
which violates the syntactic
rules governing logical names. Because it cannot be translated normally, it
is skipped, and will not appear in %ENV. This may be a benign occurrence,
as some software packages might directly modify logical name tables and
introduce nonstandard names, or it may indicate that a logical name table
has been corrupted.
print <<EOF;
).
Under Unix, this error is usually caused by executing Perl code -- either the main program, a module, or an eval'd string -- that was transferred over a network connection from a non-Unix system without properly converting the text file format.
Under systems that use something other than '\n' to delimit lines of text, this error can also be caused by reading Perl code from a file handle that is in binary mode (as set by the binmode operator).
In either case, the Perl code in question will probably need to be
converted with something like s/\x0D\x0A?/\n/g
before it can be executed.
system(),
exec(),
or a piped
open in a setuid or setgid script if $ENV{PATH}
contains a directory that is writable by the world. See the perlsec manpage.
system(),
exec(),
or a piped
open in a setuid or setgid script if $ENV{PATH}
is derived from data supplied (or potentially supplied) by the user. The
script must set the path to a known value, using trustworthy data. See the perlsec manpage.
program(s)
used for glob
and <*.c>
. This may mean that your csh (C shell) is broken. If so, you should change
all of the csh-related variables in config.sh: If you have tcsh, make the
variables refer to it as if it were csh (e.g. full_csh='/usr/bin/tcsh'
); otherwise, make them all empty (except that d_csh
should be 'undef') so that Perl will think csh is missing. In either case, after editing
config.sh, run
./Configure -S
and rebuild Perl.
ioctl(),
which
is pretty strange for a machine that supports C.
socket()
call? See listen.
sub mod { $_[0] = 1 } mod(2);
Another way is to assign to a substr()
that's off the end of
the string.
$foo[1,2,3]
. They're written like $foo[1][2][3]
, as in C.
use vars
pragma is provided for just this purpose.
Note, however, that the minimal matching quantifiers, *?
, +?
, and ??
appear to be nested quantifiers, but aren't. See the perlre manpage.
One possible cause for this is that you expected to have imported a constant to your name space with use or import while no such importing took place, it may for example be that your operating system does not support that particular constant. Hopefully you did use an explicit import list for the constants you expect to see, please see use and import. While an explicit import list would probably have caught this error earlier it naturally does not remedy the fact that your operating system still does not support that constant. Maybe you have a typo in the constants of the symbol import list of use or import or in the constant name at the line where this error was triggered?
perl -x
, but no line was found in the file beginning with #! and containing the
word ``perl''.
setregid()
call for your system.
setreuid()
call for your system.
my_pclose()
tried to close a pipe which hadn't been opened. This should have been
caught earlier as an attempt to close an unopened filehandle.
kill -l
in your shell to see the valid signal names on your system.
ref()
function to find out what kind of ref it really was.
See also the perlref manpage.
*foo
), but found a reference to something else instead. You can use the
ref()
function to find out what kind of ref it really was. See the perlref manpage.
ref()
function to find out what kind of ref it really was. See the perlref manpage.
ref()
function to find out what kind of ref it really was. See the perlref manpage.
ref()
function to find out what kind of ref it really was.
See also the perlref manpage.
ref()
function to find out what kind of ref it really was. See the perlref manpage.
run()
with a null opcode
pointer.
fallback
overloading key is specified to be true. See the overload manpage.
realloc()
wouldn't give it more memory, virtual or
otherwise.
malloc()
function returned 0, indicating there was
insufficient remaining memory (or virtual memory) to satisfy the request.
The request was judged to be small, so the possibility to trap it depends
on the way perl was compiled. By default it is not trappable. However, if
compiled for this, Perl may use the contents of $^M
as an emergency pool after die()ing
with this message. In this
case the error is trappable once.
malloc()
function returned 0, indicating there was
insufficient remaining memory (or virtual memory) to satisfy the request.
However, the request was judged large enough (compile-time default is 64K),
so a possibility to shut down by trapping this error is granted.
write()
produced more lines than can fit
on a page. See the perlform manpage.
pp_match()
routine was called with invalid
operational data.
pp_subst()
routine was called with invalid
operational data.
do_trans()
routine was called with invalid
operational data.
frexp()
failed, making
printf(``%f'')
impossible.
map()
function.
scan_num()
got called on something that wasn't a number.
sv_insert()
routine was told to remove more string
than there was string.
my $foo, $bar = @_;
when you meant
my ($foo, $bar) = @_;
Remember that ``my'' and ``local'' bind closer than comma.
Waitpid()
was asked to wait for
a process which isn't a subprocess of the current process. While this is
fine from VMS' perspective, it's probably not what you intended.
getpgrp(),
which takes no
argument, unlike the BSD version, which takes a pid.
qw()
lists contain items separated by whitespace; as with
literal strings, comment characters are not ignored, but are instead
treated as literal data. (You may have used different delimiters than the
exclamation marks parentheses shown here; braces are also frequently used.)
You probably wrote something like this:
@list = qw( a # a comment b # another comment );
when you should have written this:
@list = qw( a b );
If you really want comments, build your list the old-fashioned way, with quotes and commas:
@list = ( 'a', # a comment 'b', # another comment );
qw()
lists contain items separated by whitespace;
therefore commas aren't needed to separate the items. (You may have used
different delimiters than the parentheses shown here; braces are also
frequently used.)
You probably wrote something like this:
qw! a, b, c !;
which puts literal commas into some of the list items. Write it without commas if you don't want them to appear in your data:
qw! a b c !;
ioctl()
or fcntl()
returned more than Perl
was bargaining for. Perl guesses a reasonable buffer size, but puts a
sentinel byte at the end of the buffer just in case. This sentinel byte got
clobbered, and Perl assumes that memory is now corrupted. See ioctl.
open FOO || die;
is now misinterpreted as
open(FOO || die);
because of the strict regularization of Perl 5's grammar into unary and list operators. (The old open was a little of both.) You must put parentheses around the filehandle, or use the new ``or'' operator instead of ``||''.
open FOO || die;
sv_replace()
function was handed a new SV
with a reference count of other than 1.
safemalloc()
should have
caught it earlier.
$foo[&bar]
always behaves like a scalar, both when assigning to it and when evaluating
its argument, while @foo[&bar]
behaves like a list when you assign to it, and provides a list context to
its subscript, which can do weird things if you're expecting only one
subscript.
On the other hand, if you were actually hoping to treat the array element as a list, you need to look into how references work, because Perl will not magically convert between scalars and lists for you. See the perlref manpage.
$foo{&bar}
always behaves like a scalar, both when assigning to it and when evaluating
its argument, while @foo{&bar}
behaves like a list when you assign to it, and provides a list context to
its subscript, which can do weird things if you're expecting only one
subscript.
On the other hand, if you were actually hoping to treat the hash element as a list, you need to look into how references work, because Perl will not magically convert between scalars and lists for you. See the perlref manpage.
seek()
or sysseek()
function on a filehandle that was either never opened or has since been
closed.
select()
system call.
newSVsv()
routine was called to duplicate a
scalar that had previously been marked as free.
This is a CGI error, not a Perl error.
You need to make sure your script is executable, is accessible by the user CGI is running the script under (which is probably not the user account you tested it under), does not rely on any environment variables (like PATH) from the user it isn't running under, and isn't in a location where the CGI server can't find it, basically, more or less. Please see the following for more information:
http://www.perl.com/perl/faq/idiots-guide.html http://www.perl.com/perl/faq/perl-cgi-faq.html ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq http://hoohoo.ncsa.uiuc.edu/cgi/interface.html http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
$)
, and your operating system doesn't support the setegid()
system call (or equivalent), or at least Configure didn't think so.
$>
, and your operating system doesn't support the seteuid()
system call (or equivalent), or at least Configure didn't think so.
$(
, and your operating system doesn't support the setrgid()
system call (or equivalent), or at least Configure didn't think so.
$>, and your operating system doesn't support the setruid()
system call (or equivalent), or at least Configure didn't think so.
- Setuid/gid script is writable by world
-
(F) The setuid emulator won't run a script that is writable by the world,
because the world might have written on it already.
- shm%s not implemented
-
(F) You don't have System V shared memory IPC on your system.
- shutdown() on closed fd
-
(W) You tried to do a shutdown on a closed socket. Seems a bit superfluous.
- SIG%s handler "%s" not defined
-
(W) The signal handler named in %SIG doesn't, in
fact, exist. Perhaps you put it into the wrong package?
- sort is now a reserved word
-
(F) An ancient error message that almost nobody ever runs into anymore. But
before sort was a keyword, people sometimes used it as a filehandle.
- Sort subroutine didn't return a numeric value
-
(F) A sort comparison routine must return a number. You probably blew it by
not using
<=>
or cmp
, or by not using them correctly. See sort.
- Sort subroutine didn't return single value
-
(F) A sort comparison subroutine may not return a list value with more or
less than one element. See sort.
- Split loop
-
(P) The split was looping infinitely. (Obviously, a split shouldn't iterate
more times than there are characters of input, which is what happened.) See split.
- Stat on unopened file lt%sgt
-
(W) You tried to use the
stat()
function (or an equivalent
file test) on a filehandle that was either never opened or has since been
closed.
- Statement unlikely to be reached
-
(W) You did an
exec()
with some statement after it other than
a die().
This is almost always an error, because
exec()
never returns unless there was a failure. You probably
wanted to use system()
instead, which does return. To suppress
this warning, put the exec()
in a block by itself.
- Stub found while resolving method `%s' overloading `%s' in package `%s'
-
(P) Overloading resolution over
@ISA
tree may be broken by
importation stubs. Stubs should never be implicitely created, but explicit
calls to can
may break this.
- Subroutine %s redefined
-
(W) You redefined a subroutine. To suppress this warning, say
{
local $^W = 0;
eval "sub name { ... }";
}
- Substitution loop
-
(P) The substitution was looping infinitely. (Obviously, a substitution
shouldn't iterate more times than there are characters of input, which is
what happened.) See the discussion of substitution in
Quote and Quote-like Operators.
- Substitution pattern not terminated
-
(F) The lexer couldn't find the interior delimiter of a s/// or s{}{}
construct. Remember that bracketing delimiters count nesting level.
- Substitution replacement not terminated
-
(F) The lexer couldn't find the final delimiter of a s/// or s{}{}
construct. Remember that bracketing delimiters count nesting level.
- substr outside of string
-
(W) You tried to reference a
substr()
that pointed outside of
a string. That is, the absolute value of the offset was larger than the
length of the string. See substr.
- suidperl is no longer needed since %s
-
(F) Your Perl was compiled with -DSETUID_SCRIPTS_ARE_SECURE_NOW, but a version of the setuid emulator somehow
got run anyway.
- syntax error
-
(F) Probably means you had a syntax error. Common reasons include:
A keyword is misspelled.
A semicolon is missing.
A comma is missing.
An opening or closing parenthesis is missing.
An opening or closing brace is missing.
A closing quote is missing.
Often there will be another error message associated with the syntax error
giving more information. (Sometimes it helps to turn on -w.) The error message itself often tells you where it was in the line when
it decided to give up. Sometimes the actual error is several tokens before
this, because Perl is good at understanding random input. Occasionally the
line number may be misleading, and once in a blue moon the only way to
figure out what's triggering the error is to call
perl -c
repeatedly, chopping away half the program each time to see if the error
went away. Sort of the cybernetic version of 20 questions.
- syntax error at line %d: `%s' unexpected
-
(A) You've accidentally run your script through the Bourne shell instead of
Perl. Check the #! line, or manually feed your script into Perl yourself.
- System V IPC is not implemented on this machine
-
(F) You tried to do something with a function beginning with ``sem'',
``shm'', or ``msg''. See semctl, for example.
- Syswrite on closed filehandle
-
(W) The filehandle you're writing to got itself closed sometime before now.
Check your logic flow.
- Target of goto is too deeply nested
-
(F) You tried to use goto to reach a label that was too deeply nested for Perl to reach. Perl is
doing you a favor by refusing.
- tell() on unopened file
-
(W) You tried to use the
tell()
function on a filehandle that
was either never opened or has since been closed.
- Test on unopened file lt%sgt
-
(W) You tried to invoke a file test operator on a filehandle that isn't
open. Check your logic. See also -X.
- That use of $[ is unsupported
-
(F) Assignment to
$[
is now strictly circumscribed, and interpreted as a compiler directive. You
may say only one of
$[ = 0;
$[ = 1;
...
local $[ = 0;
local $[ = 1;
...
This is to prevent the problem of one module changing the array base out
from under another module inadvertently. See $[.
- The %s function is unimplemented
-
The function indicated isn't implemented on this architecture, according to
the probings of Configure.
- The crypt() function is unimplemented due to excessive paranoia
-
(F) Configure couldn't find the
crypt()
function on your
machine, probably because your vendor didn't supply it, probably because
they think the U.S. Government thinks it's a secret, or at least that they
will continue to pretend that it is. And if you quote me on that, I will
deny it.
- The stat preceding -l _ wasn't an lstat
-
(F) It makes no sense to test the current stat buffer for symbolic linkhood
if the last stat that wrote to the stat buffer already went past the
symlink to get to the real file. Use an actual filename instead.
- times not implemented
-
(F) Your version of the C library apparently doesn't do
times().
I suspect you're not running on Unix.
- Too few args to syscall
-
(F) There has to be at least one argument to
syscall()
to
specify the system call to call, silly dilly.
- Too late for "-T" option
-
(X) The #! line (or local equivalent) in a Perl script contains the
-T option, but Perl was not invoked with -T in its command line. This is an error because, by the time Perl discovers a -T in a script, it's too late to properly taint everything from the
environment. So Perl gives up.
If the Perl script is being executed as a command using the #! mechanism
(or its local equivalent), this error can usually be fixed by editing the
#! line so that the -T option is a part of Perl's first argument: e.g. change perl -n -T
to perl -T -n
.
If the Perl script is being executed as perl scriptname
, then the
-T option must appear on the command line: perl -T scriptname
.
- Too late for "-%s" option
-
(X) The #! line (or local equivalent) in a Perl script contains the
-M or -m option. This is an error because -M and -m options are not intended for use inside scripts. Use the use pragma instead.
- Too many ('s
-
- Too many )'s
-
(A) You've accidentally run your script through csh instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
- Too many args to syscall
-
(F) Perl supports a maximum of only 14 args to
syscall().
- Too many arguments for %s
-
(F) The function requires fewer arguments than you specified.
- trailing \ in regexp
-
(F) The regular expression ends with an unbackslashed backslash. Backslash
it. See the perlre manpage.
- Translation pattern not terminated
-
(F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
construct.
- Translation replacement not terminated
-
(F) The lexer couldn't find the final delimiter of a tr/// or tr[][]
construct.
- truncate not implemented
-
(F) Your machine doesn't implement a file truncation mechanism that
Configure knows about.
- Type of arg %d to %s must be %s (not %s)
-
(F) This function requires the argument in that position to be of a certain
type. Arrays must be
@NAME
or @{EXPR}
. Hashes must be %NAME
or %{EXPR}
. No implicit dereferencing is allowed--use the {EXPR} forms as an explicit
dereference. See the perlref manpage.
- umask: argument is missing initial 0
-
(W) A umask of 222 is incorrect. It should be 0222, because octal literals
always start with 0 in Perl, as in C.
- Unable to create sub named "%s"
-
(F) You attempted to create or access a subroutine with an illegal name.
- Unbalanced context: %d more PUSHes than POPs
-
(W) The exit code detected an internal inconsistency in how many execution
contexts were entered and left.
- Unbalanced saves: %d more saves than restores
-
(W) The exit code detected an internal inconsistency in how many values
were temporarily localized.
- Unbalanced scopes: %d more ENTERs than LEAVEs
-
(W) The exit code detected an internal inconsistency in how many blocks
were entered and left.
- Unbalanced tmps: %d more allocs than frees
-
(W) The exit code detected an internal inconsistency in how many mortal
scalars were allocated and freed.
- Undefined format "%s" called
-
(F) The format indicated doesn't seem to exist. Perhaps it's really in
another package? See the perlform manpage.
- Undefined sort subroutine "%s" called
-
(F) The sort comparison routine specified doesn't seem to exist. Perhaps
it's in a different package? See sort.
- Undefined subroutine &%s called
-
(F) The subroutine indicated hasn't been defined, or if it was, it has
since been undefined.
- Undefined subroutine called
-
(F) The anonymous subroutine you're trying to call hasn't been defined, or
if it was, it has since been undefined.
- Undefined subroutine in sort
-
(F) The sort comparison routine specified is declared but doesn't seem to
have been defined yet. See sort.
- Undefined top format "%s" called
-
(F) The format indicated doesn't seem to exist. Perhaps it's really in
another package? See the perlform manpage.
- unexec of %s into %s failed!
-
(F) The
unexec()
routine failed for some reason. See your
local FSF representative, who probably put it there in the first place.
- Unknown BYTEORDER
-
(F) There are no byte-swapping functions for a machine with this byte
order.
- unmatched () in regexp
-
(F) Unbackslashed parentheses must always be balanced in regular
expressions. If you're a vi user, the % key is valuable for finding the
matching parenthesis. See the perlre manpage.
- Unmatched right bracket
-
(F) The lexer counted more closing curly brackets (braces) than opening
ones, so you're probably missing an opening bracket. As a general rule,
you'll find the missing one (so to speak) near the place you were last
editing.
- unmatched [] in regexp
-
(F) The brackets around a character class must match. If you wish to
include a closing bracket in a character class, backslash it or put it
first. See the perlre manpage.
- Unquoted string "%s" may clash with future reserved word
-
(W) You used a bareword that might someday be claimed as a reserved word.
It's best to put such a word in quotes, or capitalize it somehow, or insert
an underbar into it. You might also declare it as a subroutine.
- Unrecognized character %s
-
(F) The Perl parser has no idea what to do with the specified character in
your Perl script (or eval). Perhaps you tried to run a compressed script, a
binary program, or a directory as a Perl program.
- Unrecognized signal name "%s"
-
(F) You specified a signal name to the
kill()
function that
was not recognized. Say kill -l
in your shell to see the valid signal names on your system.
- Unrecognized switch: -%s
-
(F) You specified an illegal option to Perl. Don't do that. (If you think
you didn't do that, check the #! line to see if it's supplying the bad
switch on your behalf.)
- Unsuccessful %s on filename containing newline
-
(W) A file operation was attempted on a filename, and that operation
failed, PROBABLY because the filename contained a newline, PROBABLY because
you forgot to
chop()
or chomp()
it off. See chomp.
- Unsupported directory function "%s" called
-
(F) Your machine doesn't support
opendir()
and
readdir().
- Unsupported function fork
-
(F) Your version of executable does not support forking.
Note that under some systems, like OS/2, there may be different flavors of
Perl executables, some of which may support fork, some not. Try changing
the name you call Perl by to perl_
, perl__
, and so on.
- Unsupported function %s
-
(F) This machines doesn't implement the indicated function, apparently. At
least, Configure doesn't think so.
- Unsupported socket function "%s" called
-
(F) Your machine doesn't support the Berkeley socket mechanism, or at least
that's what Configure thought.
- Unterminated ltgt operator
-
(F) The lexer saw a left angle bracket in a place where it was expecting a
term, so it's looking for the corresponding right angle bracket, and not
finding it. Chances are you left some needed parentheses out earlier in the
line, and you really meant a ``less than''.
- Use of "$$
" to mean "${$}" is deprecated
-
(D) Perl versions before 5.004 misinterpreted any type marker followed by
``$'' and a digit. For example, ``$$0'' was incorrectly taken to mean
``${$}0'' instead of ``${$0}''. This bug is (mostly) fixed in Perl 5.004.
However, the developers of Perl 5.004 could not fix this bug completely,
because at least two widely-used modules depend on the old meaning of
``$$0'' in a string. So Perl 5.004 still interprets ``$$<digit>'' in
the old (broken) way inside strings; but it generates this message as a
warning. And in Perl 5.005, this special treatment will cease.
- Use of $# is deprecated
-
(D) This was an ill-advised attempt to emulate a poorly defined awk feature. Use an explicit
printf()
or sprintf()
instead.
- Use of $* is deprecated
-
(D) This variable magically turned on multi-line pattern matching, both for
you and for any luckless subroutine that you happen to call. You should use
the new //m and //s modifiers now to do that without the dangerous action-at-a-distance effects
of
$*
.
- Use of %s in printf format not supported
-
(F) You attempted to use a feature of printf that is accessible from only
C. This usually means there's a better way to do it in Perl.
- Use of bare ltlt to mean ltlt"" is deprecated
-
(D) You are now encouraged to use the explicitly quoted form if you wish to
use an empty line as the terminator of the here-document.
- Use of implicit split to @_ is deprecated
-
(D) It makes a lot of work for the compiler when you clobber a subroutine's
argument list, so it's better if you assign the results of a
split()
explicitly to an array (or list).
- Use of inherited AUTOLOAD for non-method %s() is deprecated
-
(D) As an (ahem) accidental feature,
AUTOLOAD
subroutines are looked up as methods (using the @ISA
hierarchy) even when the subroutines to be autoloaded were called as plain
functions (e.g. Foo::bar()
), not as methods (e.g. Foo-
bar()>
or $obj-
bar()>).
This bug will be rectified in Perl 5.005, which will use method lookup only
for methods' AUTOLOAD
s. However, there is a significant base of existing code that may be using
the old behavior. So, as an interim step, Perl 5.004 issues an optional
warning when non-methods use inherited AUTOLOAD
s.
The simple rule is: Inheritance will not work when autoloading non-methods.
The simple fix for old code is: In any module that used to depend on
inheriting AUTOLOAD
for non-methods from a base class named
BaseClass
, execute *AUTOLOAD = \&BaseClass::AUTOLOAD
during startup.
- Use of %s is deprecated
-
(D) The construct indicated is no longer recommended for use, generally
because there's a better way to do it, and also because the old way has bad
side effects.
- Use of uninitialized value
-
(W) An undefined value was used as if it were already defined. It was
interpreted as a ``'' or a 0, but maybe it was a mistake. To suppress this
warning assign an initial value to your variables.
- Useless use of %s in void context
-
(W) You did something without a side effect in a context that does nothing
with the return value, such as a statement that doesn't return a value from
a block, or the left side of a scalar comma operator. Very often this
points not to stupidity on your part, but a failure of Perl to parse your
program the way you thought it would. For example, you'd get this if you
mixed up your C precedence with Python precedence and said
$one, $two = 1, 2;
when you meant to say
($one, $two) = (1, 2);
Another common error is to use ordinary parentheses to construct a list
reference when you should be using square or curly brackets, for example,
if you say
$array = (1,2);
when you should have said
$array = [1,2];
The square brackets explicitly turn a list value into a scalar value, while
parentheses do not. So when a parenthesized list is evaluated in a scalar
context, the comma is treated like C's comma operator, which throws away
the left argument, which is not what you want. See
the perlref manpage for more on this.
- untie attempted while %d inner references still exist
-
(W) A copy of the object returned from tie (or tied) was still valid when untie was called.
- Value of %s can be "0"; test with defined()
-
(W) In a conditional expression, you used <HANDLE>, <*> (glob), each(), or readdir() as a boolean value. Each of these constructs can return a value of ``0'';
that would make the conditional expression false, which is probably not
what you intended. When using these constructs in conditional expressions,
test their values with the defined operator.
- Variable "%s" is not imported%s
-
(F) While ``use strict'' in effect, you referred to a global variable that
you apparently thought was imported from another module, because something
else of the same name (usually a subroutine) is exported by that module. It
usually means you put the wrong funny character on the front of your
variable.
- Variable "%s" may be unavailable
-
(W) An inner (nested) anonymous subroutine is inside a named
subroutine, and outside that is another subroutine; and the anonymous
(innermost) subroutine is referencing a lexical variable defined in the
outermost subroutine. For example:
sub outermost { my $a; sub middle { sub { $a } } }
If the anonymous subroutine is called or referenced (directly or
indirectly) from the outermost subroutine, it will share the variable as
you would expect. But if the anonymous subroutine is called or referenced
when the outermost subroutine is not active, it will see the value of the
shared variable as it was before and during the *first* call to the
outermost subroutine, which is probably not what you want.
In these circumstances, it is usually best to make the middle subroutine
anonymous, using the sub {} syntax. Perl has specific support for shared variables in nested anonymous
subroutines; a named subroutine in between interferes with this feature.
- Variable "%s" will not stay shared
-
(W) An inner (nested) named subroutine is referencing a lexical variable defined in an outer
subroutine.
When the inner subroutine is called, it will probably see the value of the
outer subroutine's variable as it was before and during the *first* call to
the outer subroutine; in this case, after the first call to the outer
subroutine is complete, the inner and outer subroutines will no longer
share a common value for the variable. In other words, the variable will no
longer be shared.
Furthermore, if the outer subroutine is anonymous and references a lexical
variable outside itself, then the outer and inner subroutines will never share the given variable.
This problem can usually be solved by making the inner subroutine
anonymous, using the sub {} syntax. When inner anonymous subs that reference variables in outer
subroutines are called or referenced, they are automatically rebound to the
current values of such variables.
- Variable syntax
-
(A) You've accidentally run your script through csh instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
- Warning: something's wrong
-
(W) You passed
warn()
an empty string (the equivalent of warn "") or you called it with no args and $_
was empty.
- Warning: unable to close filehandle %s properly
-
(S) The implicit
close()
done by an open()
got an
error indication on the close().
This usually indicates your
file system ran out of disk space.
- Warning: Use of "%s" without parentheses is ambiguous
-
(S) You wrote a unary operator followed by something that looks like a
binary operator that could also have been interpreted as a term or unary
operator. For instance, if you know that the rand function has a default
argument of 1.0, and you write
rand + 5;
you may THINK you wrote the same thing as
rand() + 5;
but in actual fact, you got
rand(+5);
So put in parentheses to say what you really mean.
- Write on closed filehandle
-
(W) The filehandle you're writing to got itself closed sometime before now.
Check your logic flow.
- X outside of string
-
(F) You had a pack template that specified a relative position before the
beginning of the string being unpacked. See pack.
- x outside of string
-
(F) You had a pack template that specified a relative position after the
end of the string being unpacked. See pack.
- Xsub "%s" called in sort
-
(F) The use of an external subroutine as a sort comparison is not yet
supported.
- Xsub called in sort
-
(F) The use of an external subroutine as a sort comparison is not yet
supported.
- You can't use -l on a filehandle
-
(F) A filehandle represents an opened file, and when you opened the file it
already went past any symlink you are presumably trying to look for. Use a
filename instead.
- YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
-
(F) And you probably never will, because you probably don't have the
sources to your kernel, and your vendor probably doesn't give a rip about
what you want. Your best bet is to use the wrapsuid script in the eg
directory to put a setuid C wrapper around your script.
- You need to quote "%s"
-
(W) You assigned a bareword as a signal handler name. Unfortunately, you
already have a subroutine of that name declared, which means that Perl 5
will try to call the subroutine when the assignment is executed, which is
probably not what you want. (If it IS what you want, put an & in
front.)
- [gs]etsockopt() on closed fd
-
(W) You tried to get or set a socket option on a closed socket. Did you
forget to check the return value of your
socket()
call? See getsockopt.
- \1 better written as $1
-
(W) Outside of patterns, backreferences live on as variables. The use of
backslashes is grandfathered on the right-hand side of a substitution, but
stylistically it's better to use the variable form because other Perl
programmers will expect it, and it works better if there are more than 9
backreferences.
- '|' and 'lt' may not both be specified on command line
-
(F) An error peculiar to VMS. Perl does its own command line redirection,
and found that STDIN was a pipe, and that you also tried to redirect STDIN
using '<'. Only one STDIN stream to a customer, please.
- '|' and 'gt' may not both be specified on command line
-
(F) An error peculiar to VMS. Perl does its own command line redirection,
and thinks you tried to redirect stdout both to a file and into a pipe to
another command. You need to choose one or the other, though nothing's
stopping you from piping into a program or Perl script which 'splits'
output into two streams, such as
open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
while (<STDIN>) {
print;
print OUT;
}
close OUT;
- Got an error from DosAllocMem
-
(P) An error peculiar to OS/2. Most probably you're using an obsolete
version of Perl, and this should not happen anyway.
- Malformed PERLLIB_PREFIX
-
(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
prefix1;prefix2
or
prefix1 prefix2
with nonempty prefix1 and prefix2. If prefix1
is indeed a prefix of a builtin library search path, prefix2 is
substituted. The error may appear if components are not found, or are too
long. See ``PERLLIB_PREFIX'' in README.os2.
- PERL_SH_DIR too long
-
(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
sh
-shell in. See ``PERL_SH_DIR'' in README.os2.
- Process terminated by SIG%s
-
(W) This is a standard message issued by OS/2 applications, while
*nix
applications die in silence. It is considered a feature
of the OS/2 port. One can easily disable this by appropriate sighandlers,
see
Signals. See also ``Process terminated by SIGTERM/SIGINT'' in README.os2.