This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlfunc: clarify kill()'s return value
[perl5.git] / pod / perldiag.pod
CommitLineData
a0d0e21e
LW
1=head1 NAME
2
3perldiag - various Perl diagnostics
4
5=head1 DESCRIPTION
6
7These messages are classified as follows (listed in increasing order of
8desperation):
9
10 (W) A warning (optional).
d1d15184 11 (D) A deprecation (enabled by default).
00eb3f2b 12 (S) A severe warning (enabled by default).
a0d0e21e
LW
13 (F) A fatal error (trappable).
14 (P) An internal error you should never see (trappable).
54310121 15 (X) A very fatal error (nontrappable).
cb1a09d0 16 (A) An alien error message (not generated by Perl).
a0d0e21e 17
75b44862 18The majority of messages from the first three classifications above
64977eb6 19(W, D & S) can be controlled using the C<warnings> pragma.
e476b1b5
GS
20
21If a message can be controlled by the C<warnings> pragma, its warning
22category is included with the classification letter in the description
466416ed 23below. E.g. C<(W closed)> means a warning in the C<closed> category.
e476b1b5
GS
24
25Optional warnings are enabled by using the C<warnings> pragma or the B<-w>
fa816bf3 26and B<-W> switches. Warnings may be captured by setting C<$SIG{__WARN__}>
e476b1b5
GS
27to a reference to a routine that will be called on each warning instead
28of printing it. See L<perlvar>.
29
b7eceb5b 30Severe warnings are always enabled, unless they are explicitly disabled
e476b1b5 31with the C<warnings> pragma or the B<-X> switch.
4438c4b7 32
748a9306 33Trappable errors may be trapped using the eval operator. See
4438c4b7
JH
34L<perlfunc/eval>. In almost all cases, warnings may be selectively
35disabled or promoted to fatal errors using the C<warnings> pragma.
36See L<warnings>.
a0d0e21e 37
6df41af2
GS
38The messages are in alphabetical order, without regard to upper or
39lower-case. Some of these messages are generic. Spots that vary are
40denoted with a %s or other printf-style escape. These escapes are
41ignored by the alphabetical order, as are all characters other than
42letters. To look up your message, just ignore anything that is not a
43letter.
a0d0e21e
LW
44
45=over 4
46
6df41af2 47=item accept() on closed socket %s
33633739 48
be771a83
GS
49(W closed) You tried to do an accept on a closed socket. Did you forget
50to check the return value of your socket() call? See
51L<perlfunc/accept>.
33633739 52
de42a5a9 53=item Allocation too large: %x
a0d0e21e 54
6df41af2 55(X) You can't allocate more than 64K on an MS-DOS machine.
a0d0e21e 56
04f74579 57=item '%c' allowed only after types %s in %s
ef54e1a4 58
1109a392
MHM
59(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only
60after certain types. See L<perlfunc/pack>.
ef54e1a4 61
6df41af2 62=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
43192e07 63
75b44862 64(W ambiguous) A subroutine you have declared has the same name as a Perl
be771a83
GS
65keyword, and you have used the name without qualification for calling
66one or the other. Perl decided to call the builtin because the
67subroutine is not imported.
43192e07 68
6df41af2
GS
69To force interpretation as a subroutine call, either put an ampersand
70before the subroutine name, or qualify the name with its package.
71Alternatively, you can import the subroutine (or pretend that it's
72imported with the C<use subs> pragma).
43192e07 73
6df41af2 74To silently interpret it as the Perl operator, use the C<CORE::> prefix
496a33f5 75on the operator (e.g. C<CORE::log($x)>) or declare the subroutine
be771a83
GS
76to be an object method (see L<perlsub/"Subroutine Attributes"> or
77L<attributes>).
43192e07 78
c2e66d9e
GS
79=item Ambiguous range in transliteration operator
80
81(F) You wrote something like C<tr/a-z-0//> which doesn't mean anything at
82all. To include a C<-> character in a transliteration, put it either
83first or last. (In the past, C<tr/a-z-0//> was synonymous with
84C<tr/a-y//>, which was probably not what you would have expected.)
85
6df41af2 86=item Ambiguous use of %s resolved as %s
43192e07 87
7c7af292 88(S ambiguous) You said something that may not be interpreted the way
6df41af2
GS
89you thought. Normally it's pretty easy to disambiguate it by supplying
90a missing quote, operator, parenthesis pair or declaration.
a0d0e21e 91
591f5ca2
FC
92=item Ambiguous use of -%s resolved as -&%s()
93
94(S ambiguous) You wrote something like C<-foo>, which might be the
95string C<"-foo">, or a call to the function C<foo>, negated. If you meant
96the string, just write C<"-foo">. If you meant the function call,
97write C<-foo()>.
98
d8225693
JM
99=item Ambiguous use of %c resolved as operator %c
100
7c7af292 101(S ambiguous) C<%>, C<&>, and C<*> are both infix operators (modulus,
3303f755
FC
102bitwise and, and multiplication) I<and> initial special characters
103(denoting hashes, subroutines and typeglobs), and you said something
104like C<*foo * foo> that might be interpreted as either of them. We
105assumed you meant the infix operator, but please try to make it more
106clear -- in the example given, you might write C<*foo * foo()> if you
107really meant to multiply a glob by the result of calling a function.
d8225693 108
1ef43bca
JM
109=item Ambiguous use of %c{%s} resolved to %c%s
110
111(W ambiguous) You wrote something like C<@{foo}>, which might be
112asking for the variable C<@foo>, or it might be calling a function
113named foo, and dereferencing it as an array reference. If you wanted
1cecf2c0 114the variable, you can just write C<@foo>. If you wanted to call the
1ef43bca
JM
115function, write C<@{foo()}> ... or you could just not have a variable
116and a function with the same name, and save yourself a lot of trouble.
117
e850844c
FC
118=item Ambiguous use of %c{%s[...]} resolved to %c%s[...]
119
120=item Ambiguous use of %c{%s{...}} resolved to %c%s{...}
4da60377 121
fa816bf3
FC
122(W ambiguous) You wrote something like C<${foo[2]}> (where foo represents
123the name of a Perl keyword), which might be looking for element number
1242 of the array named C<@foo>, in which case please write C<$foo[2]>, or you
125might have meant to pass an anonymous arrayref to the function named
126foo, and then do a scalar deref on the value it returns. If you meant
127that, write C<${foo([2])}>.
ccaaf480
FC
128
129In regular expressions, the C<${foo[2]}> syntax is sometimes necessary
130to disambiguate between array subscripts and character classes.
fa816bf3
FC
131C</$length[2345]/>, for instance, will be interpreted as C<$length> followed
132by the character class C<[2345]>. If an array subscript is what you
133want, you can avoid the warning by changing C</${length[2345]}/> to the
134unsightly C</${\$length[2345]}/>, by renaming your array to something
135that does not coincide with a built-in keyword, or by simply turning
136off warnings with C<no warnings 'ambiguous';>.
4da60377 137
6df41af2 138=item '|' and '<' may not both be specified on command line
a0d0e21e 139
be771a83
GS
140(F) An error peculiar to VMS. Perl does its own command line
141redirection, and found that STDIN was a pipe, and that you also tried to
142redirect STDIN using '<'. Only one STDIN stream to a customer, please.
c9f97d15 143
6df41af2 144=item '|' and '>' may not both be specified on command line
1028017a 145
be771a83
GS
146(F) An error peculiar to VMS. Perl does its own command line
147redirection, and thinks you tried to redirect stdout both to a file and
148into a pipe to another command. You need to choose one or the other,
149though nothing's stopping you from piping into a program or Perl script
150which 'splits' output into two streams, such as
1028017a 151
6df41af2
GS
152 open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
153 while (<STDIN>) {
154 print;
155 print OUT;
156 }
157 close OUT;
c9f97d15 158
6df41af2 159=item Applying %s to %s will act on scalar(%s)
eb6e2d6f 160
496a33f5
SC
161(W misc) The pattern match (C<//>), substitution (C<s///>), and
162transliteration (C<tr///>) operators work on scalar values. If you apply
be771a83 163one of them to an array or a hash, it will convert the array or hash to
ac036724 164a scalar value (the length of an array, or the population info of a
165hash) and then work on that scalar value. This is probably not what
be771a83
GS
166you meant to do. See L<perlfunc/grep> and L<perlfunc/map> for
167alternatives.
eb6e2d6f 168
6df41af2 169=item Arg too short for msgsnd
76cd736e 170
6df41af2 171(F) msgsnd() requires a string at least as long as sizeof(long).
76cd736e 172
f86702cc 173=item Argument "%s" isn't numeric%s
a0d0e21e 174
be771a83
GS
175(W numeric) The indicated string was fed as an argument to an operator
176that expected a numeric value instead. If you're fortunate the message
177will identify which operator was so unfortunate.
a0d0e21e 178
b4581f09
JH
179=item Argument list not closed for PerlIO layer "%s"
180
a534ac11
FC
181(W layer) When pushing a layer with arguments onto the Perl I/O
182system you forgot the ) that closes the argument list. (Layers
183take care of transforming data between external and internal
184representations.) Perl stopped parsing the layer list at this
185point and did not attempt to push this layer. If your program
186didn't explicitly request the failing operation, it may be the
187result of the value of the environment variable PERLIO.
b4581f09 188
10565108
FC
189=item Argument "%s" treated as 0 in increment (++)
190
191(W numeric) The indicated string was fed as an argument to the C<++>
192operator which expects either a number or a string matching
193C</^[a-zA-Z]*[0-9]*\z/>. See L<perlop/Auto-increment and
194Auto-decrement> for details.
195
a0d0e21e
LW
196=item Array @%s missing the @ in argument %d of %s()
197
75b44862
GS
198(D deprecated) Really old Perl let you omit the @ on array names in some
199spots. This is now heavily deprecated.
a0d0e21e 200
bd299e29
KW
201=item A sequence of multiple spaces in a charnames alias definition is deprecated
202
94ec3a20
FC
203(D deprecated) You defined a character name which had multiple space
204characters in a row. Change them to single spaces. Usually these
205names are defined in the C<:alias> import argument to C<use charnames>, but
206they could be defined by a translator installed into C<$^H{charnames}>.
207See L<charnames/CUSTOM ALIASES>.
bd299e29 208
a0d0e21e
LW
209=item assertion botched: %s
210
21b5e840 211(X) The malloc package that comes with Perl had an internal failure.
a0d0e21e 212
0eacef8e 213=item Assertion %s failed: file "%s", line %d
a0d0e21e 214
21b5e840 215(X) A general assertion failed. The file in question must be examined.
a0d0e21e 216
82122228
FC
217=item Assigning non-zero to $[ is no longer possible
218
7d345e3d
FC
219(F) When the "array_base" feature is disabled (e.g., under C<use v5.16;>)
220the special variable C<$[>, which is deprecated, is now a fixed zero value.
82122228 221
a0d0e21e
LW
222=item Assignment to both a list and a scalar
223
224(F) If you assign to a conditional operator, the 2nd and 3rd arguments
225must either both be scalars or both be lists. Otherwise Perl won't
226know which context to supply to the right side.
227
2393f1b9 228=item Attempt to access disallowed key '%s' in a restricted hash
1b1f1335 229
49293501 230(F) The failing code has attempted to get or set a key which is not in
2393f1b9 231the current set of allowed keys of a restricted hash.
49293501 232
dcdfe746
FC
233=item Attempt to bless into a freed package
234
235(F) You wrote C<bless $foo> with one argument after somehow causing
236the current package to be freed. Perl cannot figure out what to
237do, so it throws up in hands in despair.
238
81689caa
HS
239=item Attempt to bless into a reference
240
241(F) The CLASSNAME argument to the bless() operator is expected to be
57dedab9 242the name of the package to bless the resulting object into. You've
81689caa
HS
243supplied instead a reference to something: perhaps you wrote
244
245 bless $self, $proto;
246
247when you intended
248
249 bless $self, ref($proto) || $proto;
250
251If you actually want to bless into the stringified version
252of the reference supplied, you need to stringify it yourself, for
253example by:
254
255 bless $self, "$proto";
256
a730510a
FC
257=item Attempt to clear deleted array
258
259(S debugging) An array was assigned to when it was being freed.
260Freed values are not supposed to be visible to Perl code. This
261can also happen if XS code calls C<av_clear> from a custom magic
262callback on the array.
263
96ebfdd7
RK
264=item Attempt to delete disallowed key '%s' from a restricted hash
265
266(F) The failing code attempted to delete from a restricted hash a key
267which is not in its key set.
268
269=item Attempt to delete readonly key '%s' from a restricted hash
270
271(F) The failing code attempted to delete a key whose value has been
272declared readonly from a restricted hash.
273
de42a5a9 274=item Attempt to free non-arena SV: 0x%x
a0d0e21e 275
f84fe999 276(S internal) All SV objects are supposed to be allocated from arenas
be771a83
GS
277that will be garbage collected on exit. An SV was discovered to be
278outside any of those arenas.
a0d0e21e 279
12578ffb 280=item Attempt to free nonexistent shared string '%s'%s
bbce6d69 281
f84fe999 282(S internal) Perl maintains a reference-counted internal table of
be771a83
GS
283strings to optimize the storage and access of hash keys and other
284strings. This indicates someone tried to decrement the reference count
285of a string that can no longer be found in the table.
bbce6d69 286
7d5b40b4 287=item Attempt to free temp prematurely: SV 0x%x
a0d0e21e 288
f84fe999 289(S debugging) Mortalized values are supposed to be freed by the
be771a83
GS
290free_tmps() routine. This indicates that something else is freeing the
291SV before the free_tmps() routine gets a chance, which means that the
292free_tmps() routine will be freeing an unreferenced scalar when it does
293try to free it.
a0d0e21e
LW
294
295=item Attempt to free unreferenced glob pointers
296
f84fe999 297(S internal) The reference counts got screwed up on symbol aliases.
a0d0e21e 298
7d5b40b4 299=item Attempt to free unreferenced scalar: SV 0x%x
a0d0e21e 300
8f7e4d2c 301(S internal) Perl went to decrement the reference count of a scalar to
be771a83
GS
302see if it would go to 0, and discovered that it had already gone to 0
303earlier, and should have been freed, and in fact, probably was freed.
304This could indicate that SvREFCNT_dec() was called too many times, or
305that SvREFCNT_inc() was called too few times, or that the SV was
306mortalized when it shouldn't have been, or that memory has been
307corrupted.
a0d0e21e 308
84902520
TB
309=item Attempt to pack pointer to temporary value
310
be771a83
GS
311(W pack) You tried to pass a temporary value (like the result of a
312function, or a computed expression) to the "p" pack() template. This
313means the result contains a pointer to a location that could become
314invalid anytime, even before the end of the current statement. Use
315literals or global values as arguments to the "p" pack() template to
316avoid this warning.
84902520 317
087b5369
RD
318=item Attempt to reload %s aborted.
319
320(F) You tried to load a file with C<use> or C<require> that failed to
321compile once already. Perl will not try to compile this file again
322unless you delete its entry from %INC. See L<perlfunc/require> and
323L<perlvar/%INC>.
324
1b20cd17
NC
325=item Attempt to set length of freed array
326
0c5c527f
FC
327(W misc) You tried to set the length of an array which has
328been freed. You can do this by storing a reference to the
329scalar representing the last index of an array and later
330assigning through that reference. For example
1b20cd17
NC
331
332 $r = do {my @a; \$#a};
333 $$r = 503
334
b7a902f4 335=item Attempt to use reference as lvalue in substr
336
be771a83
GS
337(W substr) You supplied a reference as the first argument to substr()
338used as an lvalue, which is pretty strange. Perhaps you forgot to
339dereference it first. See L<perlfunc/substr>.
b7a902f4 340
c32124fe
NC
341=item Attribute "locked" is deprecated
342
57dedab9
FC
343(D deprecated) You have used the attributes pragma to modify the
344"locked" attribute on a code reference. The :locked attribute is
345obsolete, has had no effect since 5005 threads were removed, and
346will be removed in a future release of Perl 5.
c32124fe 347
591f5ca2
FC
348=item Attribute prototype(%s) discards earlier prototype attribute in same sub
349
350(W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for
351example. Since each sub can only have one prototype, the earlier
352declaration(s) are discarded while the last one is applied.
353
f1a3ce43
NC
354=item Attribute "unique" is deprecated
355
57dedab9
FC
356(D deprecated) You have used the attributes pragma to modify
357the "unique" attribute on an array, hash or scalar reference.
358The :unique attribute has had no effect since Perl 5.8.8, and
359will be removed in a future release of Perl 5.
f1a3ce43 360
ccce04a4
FC
361=item av_reify called on tied array
362
363(S debugging) This indicates that something went wrong and Perl got I<very>
364confused about C<@_> or C<@DB::args> being tied.
365
de42a5a9 366=item Bad arg length for %s, is %u, should be %d
a0d0e21e 367
be771a83
GS
368(F) You passed a buffer of the wrong size to one of msgctl(), semctl()
369or shmctl(). In C parlance, the correct sizes are, respectively,
5f05dabc 370S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
a0d0e21e
LW
371S<sizeof(struct shmid_ds *)>.
372
7a95317d
GS
373=item Bad evalled substitution pattern
374
496a33f5 375(F) You've used the C</e> switch to evaluate the replacement for a
7a95317d
GS
376substitution, but perl found a syntax error in the code to evaluate,
377most likely an unexpected right brace '}'.
378
a0d0e21e
LW
379=item Bad filehandle: %s
380
be771a83
GS
381(F) A symbol was passed to something wanting a filehandle, but the
382symbol has no filehandle associated with it. Perhaps you didn't do an
383open(), or did it in another package.
a0d0e21e
LW
384
385=item Bad free() ignored
386
be771a83 387(S malloc) An internal routine called free() on something that had never
fa816bf3 388been malloc()ed in the first place. Mandatory, but can be disabled by
9ea8bc6d 389setting environment variable C<PERL_BADFREE> to 0.
33c8a3fe 390
9ea8bc6d 391This message can be seen quite often with DB_File on systems with "hard"
6903afa2 392dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB>
be771a83 393which is left unnoticed if C<DB> uses I<forgiving> system malloc().
a0d0e21e 394
aa689395 395=item Bad hash
396
397(P) One of the internal hash routines was passed a null HV pointer.
398
6df41af2
GS
399=item Badly placed ()'s
400
401(A) You've accidentally run your script through B<csh> instead
402of Perl. Check the #! line, or manually feed your script into
403Perl yourself.
404
a7cb8dae 405=item Bad name after %s
a0d0e21e 406
be771a83
GS
407(F) You started to name a symbol by using a package prefix, and then
408didn't finish the symbol. In particular, you can't interpolate outside
409of quotes, so
a0d0e21e
LW
410
411 $var = 'myvar';
412 $sym = mypack::$var;
413
414is not the same as
415
416 $var = 'myvar';
417 $sym = "mypack::$var";
418
88e1f1a2
JV
419=item Bad plugin affecting keyword '%s'
420
421(F) An extension using the keyword plugin mechanism violated the
422plugin API.
423
4ad56ec9
IZ
424=item Bad realloc() ignored
425
6903afa2
FC
426(S malloc) An internal routine called realloc() on something that
427had never been malloc()ed in the first place. Mandatory, but can
428be disabled by setting the environment variable C<PERL_BADFREE> to 1.
4ad56ec9 429
a0d0e21e
LW
430=item Bad symbol for array
431
432(P) An internal request asked to add an array entry to something that
433wasn't a symbol table entry.
434
4df3f177
SP
435=item Bad symbol for dirhandle
436
437(P) An internal request asked to add a dirhandle entry to something
438that wasn't a symbol table entry.
439
a0d0e21e
LW
440=item Bad symbol for filehandle
441
be771a83
GS
442(P) An internal request asked to add a filehandle entry to something
443that wasn't a symbol table entry.
a0d0e21e
LW
444
445=item Bad symbol for hash
446
447(P) An internal request asked to add a hash entry to something that
448wasn't a symbol table entry.
449
34d09196
GS
450=item Bareword found in conditional
451
be771a83
GS
452(W bareword) The compiler found a bareword where it expected a
453conditional, which often indicates that an || or && was parsed as part
454of the last argument of the previous construct, for example:
34d09196
GS
455
456 open FOO || die;
457
be771a83
GS
458It may also indicate a misspelled constant that has been interpreted as
459a bareword:
34d09196
GS
460
461 use constant TYPO => 1;
462 if (TYOP) { print "foo" }
463
464The C<strict> pragma is useful in avoiding such errors.
465
6df41af2
GS
466=item Bareword "%s" not allowed while "strict subs" in use
467
468(F) With "strict subs" in use, a bareword is only allowed as a
be771a83
GS
469subroutine identifier, in curly brackets or to the left of the "=>"
470symbol. Perhaps you need to predeclare a subroutine?
6df41af2
GS
471
472=item Bareword "%s" refers to nonexistent package
473
be771a83
GS
474(W bareword) You used a qualified bareword of the form C<Foo::>, but the
475compiler saw no other uses of that namespace before that point. Perhaps
476you need to predeclare a package?
6df41af2 477
a0d0e21e
LW
478=item BEGIN failed--compilation aborted
479
be771a83
GS
480(F) An untrapped exception was raised while executing a BEGIN
481subroutine. Compilation stops immediately and the interpreter is
482exited.
a0d0e21e 483
68dc0745 484=item BEGIN not safe after errors--compilation aborted
485
486(F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
be771a83
GS
487implies a C<BEGIN {}>) after one or more compilation errors had already
488occurred. Since the intended environment for the C<BEGIN {}> could not
489be guaranteed (due to the errors), and since subsequent code likely
490depends on its correct operation, Perl just gave up.
68dc0745 491
c782d7ee 492=item \%d better written as $%d
6df41af2 493
be771a83
GS
494(W syntax) Outside of patterns, backreferences live on as variables.
495The use of backslashes is grandfathered on the right-hand side of a
496substitution, but stylistically it's better to use the variable form
497because other Perl programmers will expect it, and it works better if
498there are more than 9 backreferences.
6df41af2 499
252aa082
JH
500=item Binary number > 0b11111111111111111111111111111111 non-portable
501
e476b1b5 502(W portable) The binary number you specified is larger than 2**32-1
9e24b6e2
JH
503(4294967295) and therefore non-portable between systems. See
504L<perlport> for more on portability concerns.
252aa082 505
69282e91 506=item bind() on closed socket %s
a0d0e21e 507
be771a83
GS
508(W closed) You tried to do a bind on a closed socket. Did you forget to
509check the return value of your socket() call? See L<perlfunc/bind>.
a0d0e21e 510
c289d2f7
JH
511=item binmode() on closed filehandle %s
512
513(W unopened) You tried binmode() on a filehandle that was never opened.
4dcecea4 514Check your control flow and number of arguments.
c289d2f7 515
e0e4a6e3
FC
516=item "\b{" is deprecated; use "\b\{" or "\b[{]" instead in regex; marked
517by S<<-- HERE> in m/%s/
f866a7cd 518
e0e4a6e3
FC
519=item "\B{" is deprecated; use "\B\{" or "\B[{]" instead in regex; marked
520by S<<-- HERE> in m/%s/
f866a7cd 521
3c664d1a 522(D deprecated) Use of an unescaped "{" immediately following
a38411bc
FC
523a C<\b> or C<\B> is now deprecated so as to reserve its use for Perl
524itself in a future release. You can either precede the brace
525with a backslash, or enclose it in square brackets; the latter
526is the way to go if the pattern delimiters are C<{}>.
f866a7cd 527
c5a0f51a
JH
528=item Bit vector size > 32 non-portable
529
e476b1b5 530(W portable) Using bit vector sizes larger than 32 is non-portable.
c5a0f51a 531
043c750c 532=item Bizarre copy of %s
4633a7c4 533
be771a83 534(P) Perl detected an attempt to copy an internal value that is not
ab830aa0 535copiable.
4633a7c4 536
5a25739d
FC
537=item Bizarre SvTYPE [%d]
538
434f489b 539(P) When starting a new thread or returning values from a thread, Perl
5a25739d
FC
540encountered an invalid data type.
541
f675dbe5
CB
542=item Buffer overflow in prime_env_iter: %s
543
be771a83
GS
544(W internal) A warning peculiar to VMS. While Perl was preparing to
545iterate over %ENV, it encountered a logical name or symbol definition
546which was too long, so it was truncated to the string shown.
f675dbe5 547
a0d0e21e
LW
548=item Callback called exit
549
4929bf7b 550(F) A subroutine invoked from an external package via call_sv()
a0d0e21e
LW
551exited by calling exit.
552
6df41af2 553=item %s() called too early to check prototype
f675dbe5 554
be771a83
GS
555(W prototype) You've called a function that has a prototype before the
556parser saw a definition or declaration for it, and Perl could not check
557that the call conforms to the prototype. You need to either add an
558early prototype declaration for the subroutine in question, or move the
559subroutine definition ahead of the call to get proper prototype
560checking. Alternatively, if you are certain that you're calling the
561function correctly, you may put an ampersand before the name to avoid
562the warning. See L<perlsub>.
f675dbe5 563
56feebad
FC
564=item Calling POSIX::%s() is deprecated
565
566(D deprecated) You called a function whose use is deprecated. See
567the function's name in L<POSIX> for details.
568
49704364 569=item Cannot compress integer in pack
0258719b
NC
570
571(F) An argument to pack("w",...) was too large to compress. The BER
572compressed integer format can only be used with positive integers, and you
573attempted to compress Infinity or a very large number (> 1e308).
574See L<perlfunc/pack>.
575
49704364 576=item Cannot compress negative numbers in pack
0258719b
NC
577
578(F) An argument to pack("w",...) was negative. The BER compressed integer
579format can only be used with positive integers. See L<perlfunc/pack>.
580
5c1f4d79
NC
581=item Cannot convert a reference to %s to typeglob
582
6903afa2
FC
583(F) You manipulated Perl's symbol table directly, stored a reference
584in it, then tried to access that symbol via conventional Perl syntax.
585The access triggers Perl to autovivify that typeglob, but it there is
586no legal conversion from that type of reference to a typeglob.
5c1f4d79 587
4040665a 588=item Cannot copy to %s
ba2fdce6
NC
589
590(P) Perl detected an attempt to copy a value to an internal type that cannot
4dcecea4 591be directly assigned to.
ba2fdce6 592
b5d97229
RGS
593=item Cannot find encoding "%s"
594
595(S io) You tried to apply an encoding that did not exist to a filehandle,
596either with open() or binmode().
597
7355df7e
FC
598=item Cannot set tied @DB::args
599
600(F) C<caller> tried to set C<@DB::args>, but found it tied. Tying C<@DB::args>
601is not supported. (Before this error was added, it used to crash.)
602
ce65bc73
FC
603=item Cannot tie unreifiable array
604
605(P) You somehow managed to call C<tie> on an array that does not
606keep a reference count on its arguments and cannot be made to
607do so. Such arrays are not even supposed to be accessible to
608Perl code, but are only used internally.
609
96ebfdd7
RK
610=item Can only compress unsigned integers in pack
611
612(F) An argument to pack("w",...) was not an integer. The BER compressed
613integer format can only be used with positive integers, and you attempted
614to compress something else. See L<perlfunc/pack>.
615
a0d0e21e
LW
616=item Can't bless non-reference value
617
618(F) Only hard references may be blessed. This is how Perl "enforces"
619encapsulation of objects. See L<perlobj>.
620
dc57907a
RGS
621=item Can't "break" in a loop topicalizer
622
0d863452 623(F) You called C<break>, but you're in a C<foreach> block rather than
6903afa2 624a C<given> block. You probably meant to use C<next> or C<last>.
0d863452
RH
625
626=item Can't "break" outside a given block
dc57907a 627
0d863452
RH
628(F) You called C<break>, but you're not inside a C<given> block.
629
6df41af2
GS
630=item Can't call method "%s" on an undefined value
631
632(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
633object reference or package name contains an undefined value. Something
634like this will reproduce the error:
6df41af2
GS
635
636 $BADREF = undef;
637 process $BADREF 1,2,3;
638 $BADREF->process(1,2,3);
639
a0d0e21e
LW
640=item Can't call method "%s" on unblessed reference
641
54310121 642(F) A method call must know in what package it's supposed to run. It
be771a83
GS
643ordinarily finds this out from the object reference you supply, but you
644didn't supply an object reference in this case. A reference isn't an
645object reference until it has been blessed. See L<perlobj>.
a0d0e21e
LW
646
647=item Can't call method "%s" without a package or object reference
648
649(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
650object reference or package name contains an expression that returns a
651defined value which is neither an object reference nor a package name.
72b5445b
GS
652Something like this will reproduce the error:
653
654 $BADREF = 42;
655 process $BADREF 1,2,3;
656 $BADREF->process(1,2,3);
657
dfe378f1
FC
658=item Can't call mro_isa_changed_in() on anonymous symbol table
659
660(P) Perl got confused as to whether a hash was a plain hash or a
661symbol table hash when trying to update @ISA caches.
662
2bf7e7b2
FC
663=item Can't call mro_method_changed_in() on anonymous symbol table
664
665(F) An XS module tried to call C<mro_method_changed_in> on a hash that was
666not attached to the symbol table.
667
a0d0e21e
LW
668=item Can't chdir to %s
669
f703fc96 670(F) You called C<perl -x/foo/bar>, but F</foo/bar> is not a directory
a0d0e21e
LW
671that you can chdir to, possibly because it doesn't exist.
672
0545a864 673=item Can't check filesystem of script "%s" for nosuid
104d25b7 674
be771a83
GS
675(P) For some reason you can't check the filesystem of the script for
676nosuid.
104d25b7 677
22e74366 678=item Can't coerce %s to %s in %s
a0d0e21e
LW
679
680(F) Certain types of SVs, in particular real symbol table entries
55497cff 681(typeglobs), can't be forced to stop being what they are. So you can't
a0d0e21e
LW
682say things like:
683
684 *foo += 1;
685
686You CAN say
687
688 $foo = *foo;
689 $foo += 1;
690
691but then $foo no longer contains a glob.
692
0d863452 693=item Can't "continue" outside a when block
dc57907a 694
0d863452
RH
695(F) You called C<continue>, but you're not inside a C<when>
696or C<default> block.
697
a0d0e21e
LW
698=item Can't create pipe mailbox
699
be771a83
GS
700(P) An error peculiar to VMS. The process is suffering from exhausted
701quotas or other plumbing problems.
a0d0e21e 702
eb64745e
GS
703=item Can't declare %s in "%s"
704
30c282f6
NC
705(F) Only scalar, array, and hash variables may be declared as "my", "our" or
706"state" variables. They must have ordinary identifiers as names.
a0d0e21e 707
fc7debfb
FC
708=item Can't "default" outside a topicalizer
709
710(F) You have used a C<default> block that is neither inside a
711C<foreach> loop nor a C<given> block. (Note that this error is
712issued on exit from the C<default> block, so you won't get the
713error if you use an explicit C<continue>.)
714
6df41af2
GS
715=item Can't do inplace edit: %s is not a regular file
716
be771a83 717(S inplace) You tried to use the B<-i> switch on a special file, such as
df7075a8 718a file in /dev, a FIFO or an uneditable directory. The file was ignored.
6df41af2 719
a0d0e21e
LW
720=item Can't do inplace edit on %s: %s
721
be771a83
GS
722(S inplace) The creation of the new file failed for the indicated
723reason.
a0d0e21e 724
54310121 725=item Can't do inplace edit without backup
a0d0e21e 726
be771a83
GS
727(F) You're on a system such as MS-DOS that gets confused if you try
728reading from a deleted (but still opened) file. You have to say
729C<-i.bak>, or some such.
a0d0e21e 730
10f9c03d 731=item Can't do inplace edit: %s would not be unique
a0d0e21e 732
e476b1b5 733(S inplace) Your filesystem does not support filenames longer than 14
10f9c03d
CK
734characters and Perl was unable to create a unique filename during
735inplace editing with the B<-i> switch. The file was ignored.
a0d0e21e 736
a0d0e21e
LW
737=item Can't do waitpid with flags
738
be771a83
GS
739(F) This machine doesn't have either waitpid() or wait4(), so only
740waitpid() without flags is emulated.
a0d0e21e 741
a0d0e21e
LW
742=item Can't emulate -%s on #! line
743
be771a83
GS
744(F) The #! line specifies a switch that doesn't make sense at this
745point. For example, it'd be kind of silly to put a B<-x> on the #!
746line.
a0d0e21e 747
1109a392
MHM
748=item Can't %s %s-endian %ss on this platform
749
750(F) Your platform's byte-order is neither big-endian nor little-endian,
751or it has a very strange pointer size. Packing and unpacking big- or
752little-endian floating point values and pointers may not be possible.
753See L<perlfunc/pack>.
754
a0d0e21e
LW
755=item Can't exec "%s": %s
756
d1be9408 757(W exec) A system(), exec(), or piped open call could not execute the
be771a83
GS
758named program for the indicated reason. Typical reasons include: the
759permissions were wrong on the file, the file wasn't found in
760C<$ENV{PATH}>, the executable in question was compiled for another
761architecture, or the #! line in a script points to an interpreter that
762can't be run for similar reasons. (Or maybe your system doesn't support
763#! at all.)
a0d0e21e
LW
764
765=item Can't exec %s
766
be771a83
GS
767(F) Perl was trying to execute the indicated program for you because
768that's what the #! line said. If that's not what you wanted, you may
769need to mention "perl" on the #! line somewhere.
a0d0e21e
LW
770
771=item Can't execute %s
772
be771a83
GS
773(F) You used the B<-S> switch, but the copies of the script to execute
774found in the PATH did not have correct permissions.
2a92aaa0 775
6df41af2 776=item Can't find an opnumber for "%s"
2a92aaa0 777
be771a83
GS
778(F) A string of a form C<CORE::word> was given to prototype(), but there
779is no builtin with the name C<word>.
6df41af2 780
56ca2fc0
JH
781=item Can't find %s character property "%s"
782
783(F) You used C<\p{}> or C<\P{}> but the character property by that name
6903afa2 784could not be found. Maybe you misspelled the name of the property?
e1b711da 785See L<perluniprops/Properties accessible through \p{} and \P{}>
9b73678d 786for a complete list of available official properties.
56ca2fc0 787
6df41af2
GS
788=item Can't find label %s
789
be771a83
GS
790(F) You said to goto a label that isn't mentioned anywhere that it's
791possible for us to go to. See L<perlfunc/goto>.
2a92aaa0
GS
792
793=item Can't find %s on PATH
794
be771a83
GS
795(F) You used the B<-S> switch, but the script to execute could not be
796found in the PATH.
a0d0e21e 797
6df41af2 798=item Can't find %s on PATH, '.' not in PATH
a0d0e21e 799
be771a83
GS
800(F) You used the B<-S> switch, but the script to execute could not be
801found in the PATH, or at least not with the correct permissions. The
802script exists in the current directory, but PATH prohibits running it.
a0d0e21e
LW
803
804=item Can't find string terminator %s anywhere before EOF
805
be771a83
GS
806(F) Perl strings can stretch over multiple lines. This message means
807that the closing delimiter was omitted. Because bracketed quotes count
808nesting levels, the following is missing its final parenthesis:
a0d0e21e 809
fb73857a 810 print q(The character '(' starts a side comment.);
811
97b3d10f 812If you're getting this error from a here-document, you may have
b6b8cb97
FC
813included unseen whitespace before or after your closing tag or there
814may not be a linebreak after it. A good programmer's editor will have
815a way to help you find these characters (or lack of characters). See
816L<perlop> for the full details on here-documents.
a0d0e21e 817
660a4616
TS
818=item Can't find Unicode property definition "%s"
819
5f8ad6b6
FC
820(F) You may have tried to use C<\p> which means a Unicode
821property (for example C<\p{Lu}> matches all uppercase
fa816bf3 822letters). If you did mean to use a Unicode property, see
e1b711da 823L<perluniprops/Properties accessible through \p{} and \P{}>
6903afa2 824for a complete list of available properties. If you didn't
fa816bf3
FC
825mean to use a Unicode property, escape the C<\p>, either by
826C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, or
5f8ad6b6 827until C<\E>).
660a4616 828
b3647a36 829=item Can't fork: %s
a0d0e21e 830
be771a83
GS
831(F) A fatal error occurred while trying to fork while opening a
832pipeline.
a0d0e21e 833
b3647a36
SR
834=item Can't fork, trying again in 5 seconds
835
c973c02e 836(W pipe) A fork in a piped open failed with EAGAIN and will be retried
b3647a36
SR
837after five seconds.
838
748a9306
LW
839=item Can't get filespec - stale stat buffer?
840
be771a83
GS
841(S) A warning peculiar to VMS. This arises because of the difference
842between access checks under VMS and under the Unix model Perl assumes.
843Under VMS, access checks are done by filename, rather than by bits in
844the stat buffer, so that ACLs and other protections can be taken into
845account. Unfortunately, Perl assumes that the stat buffer contains all
846the necessary information, and passes it, instead of the filespec, to
2fe2bdfd 847the access-checking routine. It will try to retrieve the filespec using
be771a83
GS
848the device name and FID present in the stat buffer, but this works only
849if you haven't made a subsequent call to the CRTL stat() routine,
850because the device name is overwritten with each call. If this warning
2fe2bdfd
FC
851appears, the name lookup failed, and the access-checking routine gave up
852and returned FALSE, just to be conservative. (Note: The access-checking
be771a83
GS
853routine knows about the Perl C<stat> operator and file tests, so you
854shouldn't ever see this warning in response to a Perl command; it arises
855only if some internal code takes stat buffers lightly.)
748a9306 856
a0d0e21e
LW
857=item Can't get pipe mailbox device name
858
be771a83
GS
859(P) An error peculiar to VMS. After creating a mailbox to act as a
860pipe, Perl can't retrieve its name for later use.
a0d0e21e
LW
861
862=item Can't get SYSGEN parameter value for MAXBUF
863
748a9306
LW
864(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
865mailbox buffers to be, and didn't get an answer.
a0d0e21e 866
6df41af2 867=item Can't "goto" into the middle of a foreach loop
a0d0e21e 868
be771a83
GS
869(F) A "goto" statement was executed to jump into the middle of a foreach
870loop. You can't get there from here. See L<perlfunc/goto>.
6df41af2
GS
871
872=item Can't "goto" out of a pseudo block
873
be771a83
GS
874(F) A "goto" statement was executed to jump out of what might look like
875a block, except that it isn't a proper block. This usually occurs if
876you tried to jump out of a sort() block or subroutine, which is a no-no.
877See L<perlfunc/goto>.
a0d0e21e 878
5a25739d
FC
879=item Can't goto subroutine from an eval-%s
880
881(F) The "goto subroutine" call can't be used to jump out of an eval
882"string" or block.
883
9850bf21 884=item Can't goto subroutine from a sort sub (or similar callback)
cd299c6e 885
9850bf21
RH
886(F) The "goto subroutine" call can't be used to jump out of the
887comparison sub for a sort(), or from a similar callback (such
888as the reduce() function in List::Util).
889
6df41af2
GS
890=item Can't goto subroutine outside a subroutine
891
be771a83
GS
892(F) The deeply magical "goto subroutine" call can only replace one
893subroutine call for another. It can't manufacture one out of whole
894cloth. In general you should be calling it out of only an AUTOLOAD
895routine anyway. See L<perlfunc/goto>.
6df41af2 896
0b5b802d
GS
897=item Can't ignore signal CHLD, forcing to default
898
be771a83
GS
899(W signal) Perl has detected that it is being run with the SIGCHLD
900signal (sometimes known as SIGCLD) disabled. Since disabling this
901signal will interfere with proper determination of exit status of child
902processes, Perl has reset the signal to its default value. This
903situation typically indicates that the parent program under which Perl
904may be running (e.g. cron) is being very careless.
0b5b802d 905
e2c0f81f
DG
906=item Can't kill a non-numeric process ID
907
908(F) Process identifiers must be (signed) integers. It is a fatal error to
909attempt to kill() an undefined, empty-string or otherwise non-numeric
910process identifier.
911
6df41af2 912=item Can't "last" outside a loop block
4633a7c4 913
6df41af2 914(F) A "last" statement was executed to break out of the current block,
be771a83
GS
915except that there's this itty bitty problem called there isn't a current
916block. Note that an "if" or "else" block doesn't count as a "loopish"
917block, as doesn't a block given to sort(), map() or grep(). You can
918usually double the curlies to get the same effect though, because the
919inner curlies will be considered a block that loops once. See
920L<perlfunc/last>.
4633a7c4 921
2c7d6b9c
RGS
922=item Can't linearize anonymous symbol table
923
924(F) Perl tried to calculate the method resolution order (MRO) of a
925package, but failed because the package stash has no name.
926
b8170e59
JB
927=item Can't load '%s' for module %s
928
6903afa2
FC
929(F) The module you tried to load failed to load a dynamic extension.
930This may either mean that you upgraded your version of perl to one
931that is incompatible with your old dynamic extensions (which is known
932to happen between major versions of perl), or (more likely) that your
933dynamic extension was built against an older version of the library
934that is installed on your system. You may need to rebuild your old
935dynamic extensions.
b8170e59 936
748a9306
LW
937=item Can't localize lexical variable %s
938
2ba9eb46 939(F) You used local on a variable name that was previously declared as a
b7e4ecc1
FC
940lexical variable using "my" or "state". This is not allowed. If you
941want to localize a package variable of the same name, qualify it with
942the package name.
748a9306 943
6df41af2 944=item Can't localize through a reference
4727527e 945
6df41af2
GS
946(F) You said something like C<local $$ref>, which Perl can't currently
947handle, because when it goes to restore the old value of whatever $ref
be771a83 948pointed to after the scope of the local() is finished, it can't be sure
64977eb6 949that $ref will still be a reference.
4727527e 950
ea071790 951=item Can't locate %s
ec889f3a 952
fa816bf3
FC
953(F) You said to C<do> (or C<require>, or C<use>) a file that couldn't be found.
954Perl looks for the file in all the locations mentioned in @INC, unless
955the file name included the full path to the file. Perhaps you need
956to set the PERL5LIB or PERL5OPT environment variable to say where the
957extra library is, or maybe the script needs to add the library name
be771a83
GS
958to @INC. Or maybe you just misspelled the name of the file. See
959L<perlfunc/require> and L<lib>.
a0d0e21e 960
6df41af2
GS
961=item Can't locate auto/%s.al in @INC
962
be771a83
GS
963(F) A function (or method) was called in a package which allows
964autoload, but there is no function to autoload. Most probable causes
965are a misprint in a function/method name or a failure to C<AutoSplit>
966the file, say, by doing C<make install>.
6df41af2 967
b8170e59
JB
968=item Can't locate loadable object for module %s in @INC
969
970(F) The module you loaded is trying to load an external library, like
d70d8e57 971for example, F<foo.so> or F<bar.dll>, but the L<DynaLoader> module was
b8170e59
JB
972unable to locate this library. See L<DynaLoader>.
973
a0d0e21e
LW
974=item Can't locate object method "%s" via package "%s"
975
976(F) You called a method correctly, and it correctly indicated a package
977functioning as a class, but that package doesn't define that particular
2ba9eb46 978method, nor does any of its base classes. See L<perlobj>.
a0d0e21e
LW
979
980=item Can't locate package %s for @%s::ISA
981
be771a83
GS
982(W syntax) The @ISA array contained the name of another package that
983doesn't seem to exist.
a0d0e21e 984
2f7da168
RK
985=item Can't locate PerlIO%s
986
987(F) You tried to use in open() a PerlIO layer that does not exist,
988e.g. open(FH, ">:nosuchlayer", "somefile").
989
f4ad53f4 990=item Can't make list assignment to %ENV on this system
3e3baf6d 991
be771a83
GS
992(F) List assignment to %ENV is not supported on some systems, notably
993VMS.
3e3baf6d 994
cd40cd58
NC
995=item Can't make loaded symbols global on this platform while loading %s
996
ff9c1ae8 997(S) A module passed the flag 0x01 to DynaLoader::dl_load_file() to request
cd40cd58
NC
998that symbols from the stated file are made available globally within the
999process, but that functionality is not available on this platform. Whilst
1000the module likely will still work, this may prevent the perl interpreter
1001from loading other XS-based extensions which need to link directly to
1002functions defined in the C or XS code in the stated file.
1003
a0d0e21e
LW
1004=item Can't modify %s in %s
1005
be771a83
GS
1006(F) You aren't allowed to assign to the item indicated, or otherwise try
1007to change it, such as with an auto-increment.
a0d0e21e 1008
54310121 1009=item Can't modify nonexistent substring
a0d0e21e
LW
1010
1011(P) The internal routine that does assignment to a substr() was handed
1012a NULL.
1013
6df41af2
GS
1014=item Can't modify non-lvalue subroutine call
1015
1016(F) Subroutines meant to be used in lvalue context should be declared as
2fe2bdfd 1017such. See L<perlsub/"Lvalue subroutines">.
6df41af2 1018
5f05dabc 1019=item Can't msgrcv to read-only var
a0d0e21e 1020
5f05dabc 1021(F) The target of a msgrcv must be modifiable to be used as a receive
a0d0e21e
LW
1022buffer.
1023
6df41af2
GS
1024=item Can't "next" outside a loop block
1025
1026(F) A "next" statement was executed to reiterate the current block, but
1027there isn't a current block. Note that an "if" or "else" block doesn't
be771a83
GS
1028count as a "loopish" block, as doesn't a block given to sort(), map() or
1029grep(). You can usually double the curlies to get the same effect
1030though, because the inner curlies will be considered a block that loops
1031once. See L<perlfunc/next>.
6df41af2 1032
46fa9b26
FC
1033=item Can't open %s
1034
1035(F) You tried to run a perl built with MAD support with
1036the PERL_XMLDUMP environment variable set, but the file
1037named by that variable could not be opened.
1038
a0d0e21e
LW
1039=item Can't open %s: %s
1040
c47ff5f1 1041(S inplace) The implicit opening of a file through use of the C<< <> >>
08e9d68e 1042filehandle, either implicitly under the C<-n> or C<-p> command-line
46fa9b26
FC
1043switches, or explicitly, failed for the indicated reason. Usually
1044this is because you don't have read permission for a file which
1045you named on the command line.
1046
1047(F) You tried to call perl with the B<-e> switch, but F</dev/null> (or
1048your operating system's equivalent) could not be opened.
a0d0e21e 1049
9a869a14
RGS
1050=item Can't open a reference
1051
1052(W io) You tried to open a scalar reference for reading or writing,
2fe2bdfd 1053using the 3-arg open() syntax:
9a869a14
RGS
1054
1055 open FH, '>', $ref;
1056
1057but your version of perl is compiled without perlio, and this form of
1058open is not supported.
1059
a0d0e21e
LW
1060=item Can't open bidirectional pipe
1061
be771a83
GS
1062(W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.
1063You can try any of several modules in the Perl library to do this, such
1064as IPC::Open2. Alternately, direct the pipe's output to a file using
1065">", and then read it in under a different file handle.
a0d0e21e 1066
748a9306
LW
1067=item Can't open error file %s as stderr
1068
be771a83
GS
1069(F) An error peculiar to VMS. Perl does its own command line
1070redirection, and couldn't open the file specified after '2>' or '2>>' on
1071the command line for writing.
748a9306
LW
1072
1073=item Can't open input file %s as stdin
1074
be771a83
GS
1075(F) An error peculiar to VMS. Perl does its own command line
1076redirection, and couldn't open the file specified after '<' on the
1077command line for reading.
748a9306
LW
1078
1079=item Can't open output file %s as stdout
1080
be771a83
GS
1081(F) An error peculiar to VMS. Perl does its own command line
1082redirection, and couldn't open the file specified after '>' or '>>' on
1083the command line for writing.
748a9306
LW
1084
1085=item Can't open output pipe (name: %s)
1086
be771a83
GS
1087(P) An error peculiar to VMS. Perl does its own command line
1088redirection, and couldn't open the pipe into which to send data destined
1089for stdout.
748a9306 1090
3b1cf97d 1091=item Can't open perl script "%s": %s
a0d0e21e
LW
1092
1093(F) The script you specified can't be opened for the indicated reason.
1094
fa3aa65a
JC
1095If you're debugging a script that uses #!, and normally relies on the
1096shell's $PATH search, the -S option causes perl to do that search, so
1097you don't have to type the path or C<`which $scriptname`>.
1098
6df41af2
GS
1099=item Can't read CRTL environ
1100
1101(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
1102from the CRTL's internal environment array and discovered the array was
1103missing. You need to figure out where your CRTL misplaced its environ
be771a83
GS
1104or define F<PERL_ENV_TABLES> (see L<perlvms>) so that environ is not
1105searched.
6df41af2 1106
6df41af2
GS
1107=item Can't "redo" outside a loop block
1108
1109(F) A "redo" statement was executed to restart the current block, but
1110there isn't a current block. Note that an "if" or "else" block doesn't
1111count as a "loopish" block, as doesn't a block given to sort(), map()
1112or grep(). You can usually double the curlies to get the same effect
1113though, because the inner curlies will be considered a block that
1114loops once. See L<perlfunc/redo>.
1115
64977eb6 1116=item Can't remove %s: %s, skipping file
10f9c03d 1117
be771a83
GS
1118(S inplace) You requested an inplace edit without creating a backup
1119file. Perl was unable to remove the original file to replace it with
1120the modified file. The file was left unmodified.
10f9c03d 1121
a0d0e21e
LW
1122=item Can't rename %s to %s: %s, skipping file
1123
e476b1b5 1124(S inplace) The rename done by the B<-i> switch failed for some reason,
10f9c03d 1125probably because you don't have write permission to the directory.
a0d0e21e 1126
748a9306
LW
1127=item Can't reopen input pipe (name: %s) in binary mode
1128
be771a83
GS
1129(P) An error peculiar to VMS. Perl thought stdin was a pipe, and tried
1130to reopen it to accept binary data. Alas, it failed.
748a9306 1131
4f12ec0e
FC
1132=item Can't reset %ENV on this system
1133
1134(F) You called C<reset('E')> or similar, which tried to reset
1135all variables in the current package beginning with "E". In
1136the main package, that includes %ENV. Resetting %ENV is not
1137supported on some systems, notably VMS.
1138
fe13d51d 1139=item Can't resolve method "%s" overloading "%s" in package "%s"
6df41af2 1140
1fa582fa
FC
1141(F)(P) Error resolving overloading specified by a method name (as
1142opposed to a subroutine reference): no such method callable via the
1143package. If the method name is C<???>, this is an internal error.
6df41af2 1144
cd06dffe
GS
1145=item Can't return %s from lvalue subroutine
1146
be771a83
GS
1147(F) Perl detected an attempt to return illegal lvalues (such as
1148temporary or readonly values) from a subroutine used as an lvalue. This
1149is not allowed.
cd06dffe 1150
96ebfdd7
RK
1151=item Can't return outside a subroutine
1152
1153(F) The return statement was executed in mainline code, that is, where
1154there was no subroutine call to return out of. See L<perlsub>.
1155
78f9721b
SM
1156=item Can't return %s to lvalue scalar context
1157
6903afa2
FC
1158(F) You tried to return a complete array or hash from an lvalue
1159subroutine, but you called the subroutine in a way that made Perl
1160think you meant to return only one value. You probably meant to
1161write parentheses around the call to the subroutine, which tell
1162Perl that the call should be in list context.
78f9721b 1163
a0d0e21e
LW
1164=item Can't stat script "%s"
1165
be771a83
GS
1166(P) For some reason you can't fstat() the script even though you have it
1167open already. Bizarre.
a0d0e21e 1168
a0d0e21e
LW
1169=item Can't take log of %g
1170
fb73857a 1171(F) For ordinary real numbers, you can't take the logarithm of a
6903afa2 1172negative number or zero. There's a Math::Complex package that comes
be771a83
GS
1173standard with Perl, though, if you really want to do that for the
1174negative numbers.
a0d0e21e
LW
1175
1176=item Can't take sqrt of %g
1177
1178(F) For ordinary real numbers, you can't take the square root of a
fb73857a 1179negative number. There's a Math::Complex package that comes standard
1180with Perl, though, if you really want to do that.
a0d0e21e
LW
1181
1182=item Can't undef active subroutine
1183
1184(F) You can't undefine a routine that's currently running. You can,
1185however, redefine it while it's running, and you can even undef the
1186redefined subroutine while the old routine is running. Go figure.
1187
c81225bc 1188=item Can't upgrade %s (%d) to %d
a0d0e21e 1189
be771a83
GS
1190(P) The internal sv_upgrade routine adds "members" to an SV, making it
1191into a more specialized kind of SV. The top several SV types are so
1192specialized, however, that they cannot be interconverted. This message
1193indicates that such a conversion was attempted.
a0d0e21e 1194
6651ba0b
FC
1195=item Can't use '%c' after -mname
1196
1197(F) You tried to call perl with the B<-m> switch, but you put something
1198other than "=" after the module name.
1199
1db89ea5
BS
1200=item Can't use anonymous symbol table for method lookup
1201
e27ad1f2 1202(F) The internal routine that does method lookup was handed a symbol
1db89ea5
BS
1203table that doesn't have a name. Symbol tables can become anonymous
1204for example by undefining stashes: C<undef %Some::Package::>.
1205
96ebfdd7
RK
1206=item Can't use an undefined value as %s reference
1207
1208(F) A value used as either a hard reference or a symbolic reference must
1209be a defined value. This helps to delurk some insidious errors.
1210
6df41af2
GS
1211=item Can't use bareword ("%s") as %s ref while "strict refs" in use
1212
be771a83
GS
1213(F) Only hard references are allowed by "strict refs". Symbolic
1214references are disallowed. See L<perlref>.
6df41af2 1215
90b75b61 1216=item Can't use %! because Errno.pm is not available
1d2dff63 1217
20561843 1218(F) The first time the C<%!> hash is used, perl automatically loads the
6903afa2 1219Errno.pm module. The Errno module is expected to tie the %! hash to
1d2dff63
GS
1220provide symbolic names for C<$!> errno values.
1221
1109a392
MHM
1222=item Can't use both '<' and '>' after type '%c' in %s
1223
1224(F) A type cannot be forced to have both big-endian and little-endian
1225byte-order at the same time, so this combination of modifiers is not
1226allowed. See L<perlfunc/pack>.
1227
6df41af2
GS
1228=item Can't use %s for loop variable
1229
be771a83
GS
1230(F) Only a simple scalar variable may be used as a loop variable on a
1231foreach.
6df41af2 1232
aab6a793 1233=item Can't use global %s in "%s"
6df41af2 1234
be771a83
GS
1235(F) You tried to declare a magical variable as a lexical variable. This
1236is not allowed, because the magic can be tied to only one location
1237(namely the global variable) and it would be incredibly confusing to
1238have variables in your program that looked like magical variables but
6df41af2
GS
1239weren't.
1240
6d3b25aa
RGS
1241=item Can't use '%c' in a group with different byte-order in %s
1242
1243(F) You attempted to force a different byte-order on a type
1244that is already inside a group with a byte-order modifier.
1245For example you cannot force little-endianness on a type that
1246is inside a big-endian group.
1247
c07a80fd 1248=item Can't use "my %s" in sort comparison
1249
1250(F) The global variables $a and $b are reserved for sort comparisons.
c47ff5f1 1251You mentioned $a or $b in the same line as the <=> or cmp operator,
c07a80fd 1252and the variable had earlier been declared as a lexical variable.
1253Either qualify the sort variable with the package name, or rename the
1254lexical variable.
1255
a0d0e21e
LW
1256=item Can't use %s ref as %s ref
1257
1258(F) You've mixed up your reference types. You have to dereference a
1259reference of the type needed. You can use the ref() function to
1260test the type of the reference, if need be.
1261
748a9306 1262=item Can't use string ("%s") as %s ref while "strict refs" in use
a0d0e21e 1263
5e634d20
FC
1264=item Can't use string ("%s"...) as %s ref while "strict refs" in use
1265
b41bf23f
FC
1266(F) You've told Perl to dereference a string, something which
1267C<use strict> blocks to prevent it happening accidentally. See
1268L<perlref/"Symbolic references">. This can be triggered by an C<@> or C<$>
1269in a double-quoted string immediately before interpolating a variable,
1270for example in C<"user @$twitter_id">, which says to treat the contents
1271of C<$twitter_id> as an array reference; use a C<\> to have a literal C<@>
1272symbol followed by the contents of C<$twitter_id>: C<"user \@$twitter_id">.
a0d0e21e 1273
748a9306
LW
1274=item Can't use subscript on %s
1275
1276(F) The compiler tried to interpret a bracketed expression as a
1277subscript. But to the left of the brackets was an expression that
209e7cf1 1278didn't look like a hash or array reference, or anything else subscriptable.
748a9306 1279
6df41af2
GS
1280=item Can't use \%c to mean $%c in expression
1281
75b44862
GS
1282(W syntax) In an ordinary expression, backslash is a unary operator that
1283creates a reference to its argument. The use of backslash to indicate a
1284backreference to a matched substring is valid only as part of a regular
be771a83
GS
1285expression pattern. Trying to do this in ordinary Perl code produces a
1286value that prints out looking like SCALAR(0xdecaf). Use the $1 form
1287instead.
6df41af2 1288
810b8aa5
GS
1289=item Can't weaken a nonreference
1290
1291(F) You attempted to weaken something that was not a reference. Only
1292references can be weakened.
1293
fc7debfb
FC
1294=item Can't "when" outside a topicalizer
1295
1296(F) You have used a when() block that is neither inside a C<foreach>
1297loop nor a C<given> block. (Note that this error is issued on exit
1298from the C<when> block, so you won't get the error if the match fails,
1299or if you use an explicit C<continue>.)
1300
5f05dabc 1301=item Can't x= to read-only value
a0d0e21e 1302
be771a83
GS
1303(F) You tried to repeat a constant value (often the undefined value)
1304with an assignment operator, which implies modifying the value itself.
a0d0e21e
LW
1305Perhaps you need to copy the value to a temporary, and repeat that.
1306
4a68bf9d 1307=item Character following "\c" must be ASCII
f9d13529 1308
3c664d1a 1309(F)(D deprecated, syntax) In C<\cI<X>>, I<X> must be an ASCII character.
675fa9ff
FC
1310It is planned to make this fatal in all instances in Perl v5.20. In
1311the cases where it isn't fatal, the character this evaluates to is
17a3df4c
KW
1312derived by exclusive or'ing the code point of this character with 0x40.
1313
c9faaf04
KW
1314Note that non-alphabetic ASCII characters are discouraged here as well,
1315and using non-printable ones will be deprecated starting in v5.18.
f9d13529 1316
f337b084 1317=item Character in 'C' format wrapped in pack
ac7cd81a
SC
1318
1319(W pack) You said
1320
1321 pack("C", $x)
1322
1323where $x is either less than 0 or more than 255; the C<"C"> format is
1324only for encoding native operating system characters (ASCII, EBCDIC,
1325and so on) and not for Unicode characters, so Perl behaved as if you meant
1326
1327 pack("C", $x & 255)
1328
1329If you actually want to pack Unicode codepoints, use the C<"U"> format
1330instead.
1331
f337b084 1332=item Character in 'c' format wrapped in pack
ac7cd81a
SC
1333
1334(W pack) You said
1335
1336 pack("c", $x)
1337
1338where $x is either less than -128 or more than 127; the C<"c"> format
1339is only for encoding native operating system characters (ASCII, EBCDIC,
1340and so on) and not for Unicode characters, so Perl behaved as if you meant
1341
1342 pack("c", $x & 255);
1343
1344If you actually want to pack Unicode codepoints, use the C<"U"> format
1345instead.
1346
f337b084
TH
1347=item Character in '%c' format wrapped in unpack
1348
1349(W unpack) You tried something like
1350
1351 unpack("H", "\x{2a1}")
1352
1a147d38 1353where the format expects to process a byte (a character with a value
6903afa2
FC
1354below 256), but a higher value was provided instead. Perl uses the
1355value modulus 256 instead, as if you had provided:
f337b084
TH
1356
1357 unpack("H", "\x{a1}")
1358
5a25739d
FC
1359=item Character in 'W' format wrapped in pack
1360
1361(W pack) You said
1362
1363 pack("U0W", $x)
1364
1365where $x is either less than 0 or more than 255. However, C<U0>-mode
1366expects all values to fall in the interval [0, 255], so Perl behaved
1367as if you meant:
1368
1369 pack("U0W", $x & 255)
1370
f337b084
TH
1371=item Character(s) in '%c' format wrapped in pack
1372
1373(W pack) You tried something like
1374
1375 pack("u", "\x{1f3}b")
1376
1a147d38 1377where the format expects to process a sequence of bytes (character with a
6903afa2 1378value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1379uses the character values modulus 256 instead, as if you had provided:
1380
1381 pack("u", "\x{f3}b")
1382
1383=item Character(s) in '%c' format wrapped in unpack
1384
1385(W unpack) You tried something like
1386
1387 unpack("s", "\x{1f3}b")
1388
1a147d38 1389where the format expects to process a sequence of bytes (character with a
6903afa2 1390value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1391uses the character values modulus 256 instead, as if you had provided:
1392
1393 unpack("s", "\x{f3}b")
1394
f866a7cd
FC
1395=item "\c%c" is more clearly written simply as "%s"
1396
1397(W syntax) The C<\cI<X>> construct is intended to be a way to specify
1398non-printable characters. You used it for a printable one, which is better
1399written as simply itself, perhaps preceded by a backslash for non-word
1400characters.
1401
6651ba0b
FC
1402=item Cloning substitution context is unimplemented
1403
1404(F) Creating a new thread inside the C<s///> operator is not supported.
1405
abc7ecad
SP
1406=item closedir() attempted on invalid dirhandle %s
1407
1408(W io) The dirhandle you tried to close is either closed or not really
1409a dirhandle. Check your control flow.
1410
5a25739d
FC
1411=item close() on unopened filehandle %s
1412
1413(W unopened) You tried to close a filehandle that was never opened.
1414
541ed3a9
FC
1415=item Closure prototype called
1416
1417(F) If a closure has attributes, the subroutine passed to an attribute
1418handler is the prototype that is cloned when a new closure is created.
1419This subroutine cannot be called.
1420
49704364
WL
1421=item Code missing after '/'
1422
6903afa2
FC
1423(F) You had a (sub-)template that ends with a '/'. There must be
1424another template code following the slash. See L<perlfunc/pack>.
49704364 1425
5a25739d
FC
1426=item Code point 0x%X is not Unicode, may not be portable
1427
2d88a86a 1428(S non_unicode) You had a code point above the Unicode maximum
1b64326b
FC
1429of U+10FFFF.
1430
1431Perl allows strings to contain a superset of Unicode code points, up
1432to the limit of what is storable in an unsigned integer on your system,
1433but these may not be accepted by other languages/systems. At one time,
1434it was legal in some standards to have code points up to 0x7FFF_FFFF,
1435but not higher. Code points above 0xFFFF_FFFF require larger than a
143632 bit word.
0876b9a0 1437
6df41af2
GS
1438=item %s: Command not found
1439
a892b81a
FC
1440(A) You've accidentally run your script through B<csh> or another shell
1441shell instead of Perl. Check the #! line, or manually feed your script
1442into Perl yourself. The #! line at the top of your file could look like
8f721816
MM
1443
1444 #!/usr/bin/perl -w
6df41af2 1445
7a2e2cd6 1446=item Compilation failed in require
1447
1448(F) Perl could not compile a file specified in a C<require> statement.
be771a83
GS
1449Perl uses this generic message when none of the errors that it
1450encountered were severe enough to halt compilation immediately.
7a2e2cd6 1451
c3464db5
DD
1452=item Complex regular subexpression recursion limit (%d) exceeded
1453
be771a83
GS
1454(W regexp) The regular expression engine uses recursion in complex
1455situations where back-tracking is required. Recursion depth is limited
1456to 32766, or perhaps less in architectures where the stack cannot grow
1457arbitrarily. ("Simple" and "medium" situations are handled without
1458recursion and are not subject to a limit.) Try shortening the string
1459under examination; looping in Perl code (e.g. with C<while>) rather than
1460in the regular expression engine; or rewriting the regular expression so
c2e66d9e 1461that it is simpler or backtracks less. (See L<perlfaq2> for information
be771a83 1462on I<Mastering Regular Expressions>.)
c3464db5 1463
69282e91 1464=item connect() on closed socket %s
a0d0e21e 1465
be771a83
GS
1466(W closed) You tried to do a connect on a closed socket. Did you forget
1467to check the return value of your socket() call? See
1468L<perlfunc/connect>.
a0d0e21e 1469
e21e7c6a
FC
1470=item Constant(%s): Call to &{$^H{%s}} did not return a defined value
1471
1472(F) The subroutine registered to handle constant overloading
1473(see L<overload>) or a custom charnames handler (see
1474L<charnames/CUSTOM TRANSLATORS>) returned an undefined value.
1475
1476=item Constant(%s): $^H{%s} is not defined
1477
1478(F) The parser found inconsistencies while attempting to define an
1479overloaded constant. Perhaps you forgot to load the corresponding
1480L<overload> pragma?.
1481
779c5bc9
GS
1482=item Constant is not %s reference
1483
1484(F) A constant value (perhaps declared using the C<use constant> pragma)
be771a83 1485is being dereferenced, but it amounts to the wrong type of reference.
6903afa2 1486The message indicates the type of reference that was expected. This
be771a83 1487usually indicates a syntax error in dereferencing the constant value.
779c5bc9
GS
1488See L<perlsub/"Constant Functions"> and L<constant>.
1489
4cee8e80
CS
1490=item Constant subroutine %s redefined
1491
aeb94125
FC
1492(W redefine)(S) You redefined a subroutine which had previously
1493been eligible for inlining. See L<perlsub/"Constant Functions">
1494for commentary and workarounds.
4cee8e80 1495
9607fc9c 1496=item Constant subroutine %s undefined
1497
be771a83
GS
1498(W misc) You undefined a subroutine which had previously been eligible
1499for inlining. See L<perlsub/"Constant Functions"> for commentary and
1500workarounds.
9607fc9c 1501
5a25739d
FC
1502=item Constant(%s) unknown
1503
1504(F) The parser found inconsistencies either while attempting
1505to define an overloaded constant, or when trying to find the
1506character name specified in the C<\N{...}> escape. Perhaps you
1507forgot to load the corresponding L<overload> pragma?.
1508
e7ea3e70
IZ
1509=item Copy method did not return a reference
1510
6903afa2 1511(F) The method which overloads "=" is buggy. See
13a2d996 1512L<overload/Copy Constructor>.
e7ea3e70 1513
4aaa4757
FC
1514=item &CORE::%s cannot be called directly
1515
1516(F) You tried to call a subroutine in the C<CORE::> namespace
8d605c0d 1517with C<&foo> syntax or through a reference. Some subroutines
4aaa4757
FC
1518in this package cannot yet be called that way, but must be
1519called as barewords. Something like this will work:
1520
1521 BEGIN { *shove = \&CORE::push; }
1522 shove @array, 1,2,3; # pushes on to @array
1523
6798c92b
GS
1524=item CORE::%s is not a keyword
1525
1526(F) The CORE:: namespace is reserved for Perl keywords.
1527
675fa9ff
FC
1528=item Corrupted regexp opcode %d > %d
1529
1530(P) This is either an error in Perl, or, if you're using
1531one, your L<custom regular expression engine|perlreapi>. If not the
1532latter, report the problem through the L<perlbug> utility.
1533
a0d0e21e
LW
1534=item corrupted regexp pointers
1535
1536(P) The regular expression engine got confused by what the regular
1537expression compiler gave it.
1538
1539=item corrupted regexp program
1540
be771a83
GS
1541(P) The regular expression engine got passed a regexp program without a
1542valid magic number.
a0d0e21e 1543
de42a5a9 1544=item Corrupt malloc ptr 0x%x at 0x%x
6df41af2
GS
1545
1546(P) The malloc package that comes with Perl had an internal failure.
1547
49704364
WL
1548=item Count after length/code in unpack
1549
1550(F) You had an unpack template indicating a counted-length string, but
1551you have also specified an explicit size for the string. See
1552L<perlfunc/pack>.
1553
f2cccb4c
KW
1554=for comment
1555The following are used in lib/diagnostics.t for testing two =items that
1556share the same description. Changes here need to be propagated to there
1557
6651ba0b
FC
1558=item Deep recursion on anonymous subroutine
1559
a0d0e21e
LW
1560=item Deep recursion on subroutine "%s"
1561
be771a83
GS
1562(W recursion) This subroutine has called itself (directly or indirectly)
1563100 times more than it has returned. This probably indicates an
1564infinite recursion, unless you're writing strange benchmark programs, in
1565which case it indicates something else.
a0d0e21e 1566
aad1d01f
NC
1567This threshold can be changed from 100, by recompiling the F<perl> binary,
1568setting the C pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
1569
f10b0346 1570=item defined(@array) is deprecated
69794302 1571
be771a83
GS
1572(D deprecated) defined() is not usually useful on arrays because it
1573checks for an undefined I<scalar> value. If you want to see if the
64977eb6 1574array is empty, just use C<if (@array) { # not empty }> for example.
69794302 1575
f10b0346 1576=item defined(%hash) is deprecated
69794302 1577
f0ec9725
KR
1578(D deprecated) C<defined()> is not usually right on hashes and has been
1579discouraged since 5.004.
1580
1581Although C<defined %hash> is false on a plain not-yet-used hash, it
1582becomes true in several non-obvious circumstances, including iterators,
1583weak references, stash names, even remaining true after C<undef %hash>.
1584These things make C<defined %hash> fairly useless in practice.
1585
1586If a check for non-empty is what you wanted then just put it in boolean
1587context (see L<perldata/Scalar values>):
16546e45
KR
1588
1589 if (%hash) {
1590 # not empty
1591 }
1592
f0ec9725
KR
1593If you had C<defined %Foo::Bar::QUUX> to check whether such a package
1594variable exists then that's never really been reliable, and isn't
1595a good way to enquire about the features of a package, or whether
1596it's loaded, etc.
1597
69794302 1598
e0e4a6e3
FC
1599=item (?(DEFINE)....) does not allow branches in regex; marked by
1600S<<-- HERE> in m/%s/
bcb95744 1601
6903afa2 1602(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
bcb95744
FC
1603most likely cause of this error is that you left out a parenthesis inside
1604of the C<....> part.
1605
9e3ec65c 1606The <-- HERE shows whereabouts in the regular expression the problem was
bcb95744
FC
1607discovered.
1608
62658f4d
PM
1609=item %s defines neither package nor VERSION--version check failed
1610
1611(F) You said something like "use Module 42" but in the Module file
1612there are neither package declarations nor a C<$VERSION>.
1613
36447869
FC
1614=item delete argument is index/value array slice, use array slice
1615
1616(F) You used index/value array slice syntax (C<%array[...]>) as
1617the argument to C<delete>. You probably meant C<@array[...]> with
1618an @ symbol instead.
1619
1620=item delete argument is key/value hash slice, use hash slice
1621
1622(F) You used key/value hash slice syntax (C<%hash{...}>) as the argument to
1623C<delete>. You probably meant C<@hash{...}> with an @ symbol instead.
1624
0ffcbc25
FC
1625=item delete argument is not a HASH or ARRAY element or slice
1626
4a0af295 1627(F) The argument to C<delete> must be either a hash or array element,
0ffcbc25
FC
1628such as:
1629
1630 $foo{$bar}
1631 $ref->{"susie"}[12]
1632
1633or a hash or array slice, such as:
1634
1635 @foo[$bar, $baz, $xyzzy]
1636 @{$ref->[12]}{"susie", "queue"}
1637
fc36a67e 1638=item Delimiter for here document is too long
1639
be771a83
GS
1640(F) In a here document construct like C<<<FOO>, the label C<FOO> is too
1641long for Perl to handle. You have to be seriously twisted to write code
1642that triggers this error.
fc36a67e 1643
6d3b25aa
RGS
1644=item Deprecated use of my() in false conditional
1645
fa816bf3
FC
1646(D deprecated) You used a declaration similar to C<my $x if 0>. There
1647has been a long-standing bug in Perl that causes a lexical variable
6d3b25aa 1648not to be cleared at scope exit when its declaration includes a false
6903afa2 1649conditional. Some people have exploited this bug to achieve a kind of
fa816bf3 1650static variable. Since we intend to fix this bug, we don't want people
6903afa2 1651relying on this behavior. You can achieve a similar static effect by
6d3b25aa 1652declaring the variable in a separate block outside the function, eg
36fb85f3 1653
6d3b25aa
RGS
1654 sub f { my $x if 0; return $x++ }
1655
1656becomes
1657
1658 { my $x; sub f { return $x++ } }
1659
ea9d9ebc 1660Beginning with perl 5.10.0, you can also use C<state> variables to have
fa816bf3 1661lexicals that are initialized only once (see L<feature>):
36fb85f3
RGS
1662
1663 sub f { state $x; return $x++ }
1664
500ab966
RGS
1665=item DESTROY created new reference to dead object '%s'
1666
1667(F) A DESTROY() method created a new reference to the object which is
6903afa2
FC
1668just being DESTROYed. Perl is confused, and prefers to abort rather
1669than to create a dangling reference.
500ab966 1670
3cdd684c
TP
1671=item Did not produce a valid header
1672
1673See Server error.
1674
6df41af2
GS
1675=item %s did not return a true value
1676
1677(F) A required (or used) file must return a true value to indicate that
1678it compiled correctly and ran its initialization code correctly. It's
1679traditional to end such a file with a "1;", though any true value would
1680do. See L<perlfunc/require>.
1681
cc507455 1682=item (Did you mean &%s instead?)
4633a7c4 1683
413ff9f6
FC
1684(W misc) You probably referred to an imported subroutine &FOO as $FOO or
1685some such.
4633a7c4 1686
cc507455 1687=item (Did you mean "local" instead of "our"?)
33633739 1688
be771a83
GS
1689(W misc) Remember that "our" does not localize the declared global
1690variable. You have declared it again in the same lexical scope, which
1691seems superfluous.
33633739 1692
cc507455 1693=item (Did you mean $ or @ instead of %?)
a0d0e21e 1694
be771a83
GS
1695(W) You probably said %hash{$key} when you meant $hash{$key} or
1696@hash{@keys}. On the other hand, maybe you just meant %hash and got
1697carried away.
748a9306 1698
7e1af8bc 1699=item Died
5f05dabc 1700
1701(F) You passed die() an empty string (the equivalent of C<die "">) or
075b00aa 1702you called it with no args and C<$@> was empty.
5f05dabc 1703
3cdd684c
TP
1704=item Document contains no data
1705
1706See Server error.
1707
62658f4d
PM
1708=item %s does not define %s::VERSION--version check failed
1709
1710(F) You said something like "use Module 42" but the Module did not
943fc58e 1711define a C<$VERSION>.
62658f4d 1712
49704364
WL
1713=item '/' does not take a repeat count
1714
1715(F) You cannot put a repeat count of any kind right after the '/' code.
1716See L<perlfunc/pack>.
1717
95cb0d72
FC
1718=item Don't know how to get file name
1719
1720(P) C<PerlIO_getname>, a perl internal I/O function specific to VMS, was
1721somehow called on another platform. This should not happen.
1722
4021c788 1723=item Don't know how to handle magic of type \%o
a0d0e21e
LW
1724
1725(P) The internal handling of magical variables has been cursed.
1726
1727=item do_study: out of memory
1728
1729(P) This should have been caught by safemalloc() instead.
1730
6df41af2
GS
1731=item (Do you need to predeclare %s?)
1732
56da5a46
RGS
1733(S syntax) This is an educated guess made in conjunction with the message
1734"%s found where operator expected". It often means a subroutine or module
6df41af2
GS
1735name is being referenced that hasn't been declared yet. This may be
1736because of ordering problems in your file, or because of a missing
be771a83
GS
1737"sub", "package", "require", or "use" statement. If you're referencing
1738something that isn't defined yet, you don't actually have to define the
1739subroutine or package before the current location. You can use an empty
1740"sub foo;" or "package FOO;" to enter a "forward" declaration.
6df41af2 1741
ac206dc8
RGS
1742=item dump() better written as CORE::dump()
1743
1744(W misc) You used the obsolescent C<dump()> built-in function, without fully
1745qualifying it as C<CORE::dump()>. Maybe it's a typo. See L<perlfunc/dump>.
1746
84d78eb7
YO
1747=item dump is not supported
1748
1749(F) Your machine doesn't support dump/undump.
1750
a0d0e21e
LW
1751=item Duplicate free() ignored
1752
be771a83
GS
1753(S malloc) An internal routine called free() on something that had
1754already been freed.
a0d0e21e 1755
1109a392
MHM
1756=item Duplicate modifier '%c' after '%c' in %s
1757
35f0cd76
FC
1758(W unpack) You have applied the same modifier more than once after a
1759type in a pack template. See L<perlfunc/pack>.
1109a392 1760
0953b66b
FC
1761=item each on reference is experimental
1762
0773cb3e
FC
1763(S experimental::autoderef) C<each> with a scalar argument is experimental
1764and may change or be removed in a future Perl version. If you want to
1765take the risk of using this feature, simply disable this warning:
0953b66b 1766
d401967c 1767 no warnings "experimental::autoderef";
0953b66b 1768
4633a7c4
LW
1769=item elseif should be elsif
1770
fa816bf3
FC
1771(S syntax) There is no keyword "elseif" in Perl because Larry thinks
1772it's ugly. Your code will be interpreted as an attempt to call a method
1773named "elseif" for the class returned by the following block. This is
4633a7c4
LW
1774unlikely to be what you want.
1775
e0e4a6e3 1776=item Empty \%c{} in regex; marked by S<<-- HERE> in m/%s/
ab13f0c7 1777
af6f566e 1778(F) C<\p> and C<\P> are used to introduce a named Unicode property, as
6903afa2 1779described in L<perlunicode> and L<perlre>. You used C<\p> or C<\P> in
af6f566e 1780a regular expression without specifying the property name.
ab13f0c7 1781
85ab1d1d 1782=item entering effective %s failed
5ff3f7a4 1783
85ab1d1d 1784(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
1785effective uids or gids failed.
1786
c038024b
RGS
1787=item %ENV is aliased to %s
1788
1789(F) You're running under taint mode, and the C<%ENV> variable has been
1790aliased to another hash, so it doesn't reflect anymore the state of the
6903afa2 1791program's environment. This is potentially insecure.
c038024b 1792
748a9306
LW
1793=item Error converting file specification %s
1794
5f05dabc 1795(F) An error peculiar to VMS. Because Perl may have to deal with file
748a9306 1796specifications in either VMS or Unix syntax, it converts them to a
be771a83
GS
1797single form when it must operate on them directly. Either you've passed
1798an invalid file specification to Perl, or you've found a case the
1799conversion routines don't handle. Drat.
748a9306 1800
ff56e4f1
KW
1801=item Escape literal pattern white space under /x
1802
1803(D deprecated) You compiled a regular expression pattern with C</x> to
1804ignore white space, and you used, as a literal, one of the characters
1805that Perl plans to eventually treat as white space. The character must
1806be escaped somehow, or it will work differently on a future Perl that
1807does treat it as white space. The easiest way is to insert a backslash
1808immediately before it, or to enclose it with square brackets. This
1809change is to bring Perl into conformance with Unicode recommendations.
1810Here are the five characters that generate this warning:
1811U+0085 NEXT LINE,
1812U+200E LEFT-TO-RIGHT MARK,
1813U+200F RIGHT-TO-LEFT MARK,
1814U+2028 LINE SEPARATOR,
1815and
1816U+2029 PARAGRAPH SEPARATOR.
1817
ad19ef22 1818=item Eval-group in insecure regular expression
e4d48cc9 1819
be771a83
GS
1820(F) Perl detected tainted data when trying to compile a regular
1821expression that contains the C<(?{ ... })> zero-width assertion, which
1822is unsafe. See L<perlre/(?{ code })>, and L<perlsec>.
e4d48cc9 1823
ad19ef22 1824=item Eval-group not allowed at runtime, use re 'eval' in regex m/%s/
e4d48cc9 1825
be771a83
GS
1826(F) Perl tried to compile a regular expression containing the
1827C<(?{ ... })> zero-width assertion at run time, as it would when the
f11307f5
FC
1828pattern contains interpolated values. Since that is a security risk,
1829it is not allowed. If you insist, you may still do this by using the
1830C<re 'eval'> pragma or by explicitly building the pattern from an
1831interpolated string at run time and using that in an eval(). See
1832L<perlre/(?{ code })>.
e4d48cc9 1833
ad19ef22 1834=item Eval-group not allowed, use re 'eval' in regex m/%s/
6df41af2 1835
be771a83
GS
1836(F) A regular expression contained the C<(?{ ... })> zero-width
1837assertion, but that construct is only allowed when the C<use re 'eval'>
1838pragma is in effect. See L<perlre/(?{ code })>.
6df41af2 1839
e0e4a6e3
FC
1840=item EVAL without pos change exceeded limit in regex; marked by
1841S<<-- HERE> in m/%s/
1a147d38
YO
1842
1843(F) You used a pattern that nested too many EVAL calls without consuming
6903afa2 1844any text. Restructure the pattern so that text is consumed.
1a147d38 1845
9e3ec65c 1846The <-- HERE shows whereabouts in the regular expression the problem was
1a147d38
YO
1847discovered.
1848
fc36a67e 1849=item Excessively long <> operator
1850
1851(F) The contents of a <> operator may not exceed the maximum size of a
1852Perl identifier. If you're just trying to glob a long list of
1853filenames, try using the glob() operator, or put the filenames into a
1854variable and glob that.
1855
ed9aa3b7
SG
1856=item exec? I'm not *that* kind of operating system
1857
af8bb25a 1858(F) The C<exec> function is not implemented on some systems, e.g., Symbian
6903afa2 1859OS. See L<perlport>.
ed9aa3b7 1860
fe13d51d 1861=item Execution of %s aborted due to compilation errors.
a0d0e21e
LW
1862
1863(F) The final summary message when a Perl compilation fails.
1864
0ffcbc25
FC
1865=item exists argument is not a HASH or ARRAY element or a subroutine
1866
4a0af295 1867(F) The argument to C<exists> must be a hash or array element or a
0ffcbc25
FC
1868subroutine with an ampersand, such as:
1869
1870 $foo{$bar}
1871 $ref->{"susie"}[12]
1872 &do_something
1873
1874=item exists argument is not a subroutine name
1875
ccfc2567
FC
1876(F) The argument to C<exists> for C<exists &sub> must be a subroutine name,
1877and not a subroutine call. C<exists &sub()> will generate this error.
0ffcbc25 1878
a0d0e21e
LW
1879=item Exiting eval via %s
1880
be771a83
GS
1881(W exiting) You are exiting an eval by unconventional means, such as a
1882goto, or a loop control statement.
e476b1b5
GS
1883
1884=item Exiting format via %s
1885
9a2ff54b 1886(W exiting) You are exiting a format by unconventional means, such as a
be771a83 1887goto, or a loop control statement.
a0d0e21e 1888
0a753a76 1889=item Exiting pseudo-block via %s
1890
be771a83
GS
1891(W exiting) You are exiting a rather special block construct (like a
1892sort block or subroutine) by unconventional means, such as a goto, or a
1893loop control statement. See L<perlfunc/sort>.
0a753a76 1894
a0d0e21e
LW
1895=item Exiting subroutine via %s
1896
be771a83
GS
1897(W exiting) You are exiting a subroutine by unconventional means, such
1898as a goto, or a loop control statement.
a0d0e21e
LW
1899
1900=item Exiting substitution via %s
1901
be771a83
GS
1902(W exiting) You are exiting a substitution by unconventional means, such
1903as a return, a goto, or a loop control statement.
a0d0e21e 1904
e0e4a6e3 1905=item Expecting close bracket in regex; marked by S<<-- HERE> in m/%s/
c608e803 1906
675fa9ff 1907(F) You wrote something like
c608e803
KW
1908
1909 (?13
1910
1911to denote a capturing group of the form
1912L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>,
1913but omitted the C<")">.
1914
e0e4a6e3 1915=item Expecting '(?flags:(?[...' in regex; marked by S<<-- HERE> in m/%s/
27350048 1916
8b6fbf55
FC
1917(F) The C<(?[...])> extended character class regular expression construct
1918only allows character classes (including character class escapes like
1919C<\d>), operators, and parentheses. The one exception is C<(?flags:...)>
1920containing at least one flag and exactly one C<(?[...])> construct.
27350048
FC
1921This allows a regular expression containing just C<(?[...])> to be
1922interpolated. If you see this error message, then you probably
1923have some other C<(?...)> construct inside your character class. See
1924L<perlrecharclass/Extended Bracketed Character Classes>.
1925
30d9c59b
Z
1926=item Experimental subroutine signatures not enabled
1927
1928(F) To use subroutine signatures, you must first enable them:
1929
caa35032 1930 no warnings "experimental::signatures";
30d9c59b
Z
1931 use feature "signatures";
1932 sub foo ($left, $right) { ... }
1933
6da34ecb
FC
1934=item Experimental "%s" subs not enabled
1935
1936(F) To use lexical subs, you must first enable them:
1937
1938 no warnings 'experimental::lexical_subs';
1939 use feature 'lexical_subs';
1940 my sub foo { ... }
1941
7b8d334a
GS
1942=item Explicit blessing to '' (assuming package main)
1943
be771a83
GS
1944(W misc) You are blessing a reference to a zero length string. This has
1945the effect of blessing the reference into the package main. This is
1946usually not what you want. Consider providing a default target package,
1947e.g. bless($ref, $p || 'MyPackage');
7b8d334a 1948
6df41af2
GS
1949=item %s: Expression syntax
1950
be771a83
GS
1951(A) You've accidentally run your script through B<csh> instead of Perl.
1952Check the #! line, or manually feed your script into Perl yourself.
6df41af2
GS
1953
1954=item %s failed--call queue aborted
1955
3c10abe3
AG
1956(F) An untrapped exception was raised while executing a UNITCHECK,
1957CHECK, INIT, or END subroutine. Processing of the remainder of the
1958queue of such routines has been prematurely ended.
6df41af2 1959
e0e4a6e3 1960=item False [] range "%s" in regex; marked by S<<-- HERE> in m/%s/
73b437c8 1961
98d31c73 1962(W regexp)(F) A character class range must start and end at a literal
7253e4e3 1963character, not another character class like C<\d> or C<[:alpha:]>. The "-"
3c6ca74a
FC
1964in your false range is interpreted as a literal "-". In a C<(?[...])>
1965construct, this is an error, rather than a warning. Consider quoting
e0e4a6e3 1966the "-", "\-". The S<<-- HERE> shows whereabouts in the regular expression
3c6ca74a 1967the problem was discovered. See L<perlre>.
73b437c8 1968
1b1ee2ef 1969=item Fatal VMS error (status=%d) at %s, line %d
a0d0e21e 1970
be771a83
GS
1971(P) An error peculiar to VMS. Something untoward happened in a VMS
1972system service or RTL routine; Perl's exit status should provide more
1973details. The filename in "at %s" and the line number in "line %d" tell
1974you which section of the Perl source code is distressed.
a0d0e21e
LW
1975
1976=item fcntl is not implemented
1977
1978(F) Your machine apparently doesn't implement fcntl(). What is this, a
1979PDP-11 or something?
1980
22846ab4
AB
1981=item FETCHSIZE returned a negative value
1982
1983(F) A tied array claimed to have a negative number of elements, which
1984is not possible.
1985
f337b084
TH
1986=item Field too wide in 'u' format in pack
1987
d8b5cc61 1988(W pack) Each line in an uuencoded string starts with a length indicator
6903afa2
FC
1989which can't encode values above 63. So there is no point in asking for
1990a line length bigger than that. Perl will behave as if you specified
5c96f6f7 1991C<u63> as the format.
f337b084 1992
af8c498a 1993=item Filehandle %s opened only for input
a0d0e21e 1994
6c8d78fb
HS
1995(W io) You tried to write on a read-only filehandle. If you intended
1996it to be a read-write filehandle, you needed to open it with "+<" or
1997"+>" or "+>>" instead of with "<" or nothing. If you intended only to
1998write the file, use ">" or ">>". See L<perlfunc/open>.
a0d0e21e 1999
af8c498a 2000=item Filehandle %s opened only for output
a0d0e21e 2001
6c8d78fb
HS
2002(W io) You tried to read from a filehandle opened only for writing, If
2003you intended it to be a read/write filehandle, you needed to open it
89a1bda8
FC
2004with "+<" or "+>" or "+>>" instead of with ">". If you intended only to
2005read from the file, use "<". See L<perlfunc/open>. Another possibility
2006is that you attempted to open filedescriptor 0 (also known as STDIN) for
2007output (maybe you closed STDIN earlier?).
97828cef
RGS
2008
2009=item Filehandle %s reopened as %s only for input
2010
2011(W io) You opened for reading a filehandle that got the same filehandle id
6903afa2 2012as STDOUT or STDERR. This occurred because you closed STDOUT or STDERR
97828cef
RGS
2013previously.
2014
2015=item Filehandle STDIN reopened as %s only for output
2016
2017(W io) You opened for writing a filehandle that got the same filehandle id
fa816bf3 2018as STDIN. This occurred because you closed STDIN previously.
a0d0e21e
LW
2019
2020=item Final $ should be \$ or $name
2021
2022(F) You must now decide whether the final $ in a string was meant to be
be771a83
GS
2023a literal dollar sign, or was meant to introduce a variable name that
2024happens to be missing. So you have to put either the backslash or the
2025name.
a0d0e21e 2026
56e90b21
GS
2027=item flock() on closed filehandle %s
2028
be771a83 2029(W closed) The filehandle you're attempting to flock() got itself closed
c289d2f7 2030some time before now. Check your control flow. flock() operates on
be771a83
GS
2031filehandles. Are you attempting to call flock() on a dirhandle by the
2032same name?
56e90b21 2033
6df41af2
GS
2034=item Format not terminated
2035
2036(F) A format must be terminated by a line with a solitary dot. Perl got
2037to the end of your file without finding such a line.
2038
a0d0e21e
LW
2039=item Format %s redefined
2040
e476b1b5 2041(W redefine) You redefined a format. To suppress this warning, say
a0d0e21e
LW
2042
2043 {
271595cc 2044 no warnings 'redefine';
a0d0e21e
LW
2045 eval "format NAME =...";
2046 }
2047
a0d0e21e
LW
2048=item Found = in conditional, should be ==
2049
e476b1b5 2050(W syntax) You said
a0d0e21e
LW
2051
2052 if ($foo = 123)
2053
2054when you meant
2055
2056 if ($foo == 123)
2057
2058(or something like that).
2059
6df41af2
GS
2060=item %s found where operator expected
2061
56da5a46
RGS
2062(S syntax) The Perl lexer knows whether to expect a term or an operator.
2063If it sees what it knows to be a term when it was expecting to see an
be771a83
GS
2064operator, it gives you this warning. Usually it indicates that an
2065operator or delimiter was omitted, such as a semicolon.
6df41af2 2066
a0d0e21e
LW
2067=item gdbm store returned %d, errno %d, key "%s"
2068
2069(S) A warning from the GDBM_File extension that a store failed.
2070
2071=item gethostent not implemented
2072
2073(F) Your C library apparently doesn't implement gethostent(), probably
2074because if it did, it'd feel morally obligated to return every hostname
2075on the Internet.
2076
69282e91 2077=item get%sname() on closed socket %s
a0d0e21e 2078
be771a83
GS
2079(W closed) You tried to get a socket or peer socket name on a closed
2080socket. Did you forget to check the return value of your socket() call?
a0d0e21e 2081
748a9306
LW
2082=item getpwnam returned invalid UIC %#o for user "%s"
2083
2084(S) A warning peculiar to VMS. The call to C<sys$getuai> underlying the
2085C<getpwnam> operator returned an invalid UIC.
2086
6df41af2
GS
2087=item getsockopt() on closed socket %s
2088
be771a83
GS
2089(W closed) You tried to get a socket option on a closed socket. Did you
2090forget to check the return value of your socket() call? See
6df41af2
GS
2091L<perlfunc/getsockopt>.
2092
0f539b13
BF
2093=item given is experimental
2094
675fa9ff
FC
2095(S experimental::smartmatch) C<given> depends on smartmatch, which
2096is experimental, so its behavior may change or even be removed
2097in any future release of perl. See the explanation under
2098L<perlsyn/Experimental Details on given and when>.
0f539b13 2099
6df41af2
GS
2100=item Global symbol "%s" requires explicit package name
2101
a4edf47d 2102(F) You've said "use strict" or "use strict vars", which indicates
30c282f6 2103that all variables must either be lexically scoped (using "my" or "state"),
a4edf47d
GS
2104declared beforehand using "our", or explicitly qualified to say
2105which package the global variable is in (using "::").
6df41af2 2106
e476b1b5
GS
2107=item glob failed (%s)
2108
5ead438e 2109(S glob) Something went wrong with the external program(s) used
73c4e9dc
FC
2110for C<glob> and C<< <*.c> >>. Usually, this means that you supplied a C<glob>
2111pattern that caused the external program to fail and exit with a
be771a83 2112nonzero status. If the message indicates that the abnormal exit
73c4e9dc
FC
2113resulted in a coredump, this may also mean that your csh (C shell)
2114is broken. If so, you should change all of the csh-related variables
2115in config.sh: If you have tcsh, make the variables refer to it as
2116if it were csh (e.g. C<full_csh='/usr/bin/tcsh'>); otherwise, make them
2117all empty (except that C<d_csh> should be C<'undef'>) so that Perl will
be771a83 2118think csh is missing. In either case, after editing config.sh, run
75b44862 2119C<./Configure -S> and rebuild Perl.
e476b1b5 2120
a0d0e21e
LW
2121=item Glob not terminated
2122
2123(F) The lexer saw a left angle bracket in a place where it was expecting
be771a83
GS
2124a term, so it's looking for the corresponding right angle bracket, and
2125not finding it. Chances are you left some needed parentheses out
2126earlier in the line, and you really meant a "less than".
a0d0e21e 2127
bcd05b94 2128=item gmtime(%f) too large
8b56d6ff 2129
e9200be3 2130(W overflow) You called C<gmtime> with a number that was larger than
fc003d4b 2131it can reliably handle and C<gmtime> probably returned the wrong
6903afa2 2132date. This warning is also triggered with NaN (the special
fc003d4b
MS
2133not-a-number value).
2134
bcd05b94 2135=item gmtime(%f) too small
fc003d4b 2136
e9200be3 2137(W overflow) You called C<gmtime> with a number that was smaller than
e7a1a147 2138it can reliably handle and C<gmtime> probably returned the wrong date.
8b56d6ff 2139
6df41af2 2140=item Got an error from DosAllocMem
a0d0e21e 2141
6df41af2
GS
2142(P) An error peculiar to OS/2. Most probably you're using an obsolete
2143version of Perl, and this should not happen anyway.
a0d0e21e
LW
2144
2145=item goto must have label
2146
2147(F) Unlike with "next" or "last", you're not allowed to goto an
2148unspecified destination. See L<perlfunc/goto>.
2149
6651ba0b
FC
2150=item Goto undefined subroutine%s
2151
2152(F) You tried to call a subroutine with C<goto &sub> syntax, but
2153the indicated subroutine hasn't been defined, or if it was, it
2154has since been undefined.
2155
6fbc9859 2156=item Group name must start with a non-digit word character in regex; marked by
e0e4a6e3 2157S<<-- HERE> in m/%s/
1f4f6bf1
YO
2158
2159(F) Group names must follow the rules for perl identifiers, meaning
f26c79ba
FC
2160they must start with a non-digit word character. A common cause of
2161this error is using (?&0) instead of (?0). See L<perlre>.
1f4f6bf1 2162
5a25739d
FC
2163=item ()-group starts with a count
2164
2165(F) A ()-group started with a count. A count is supposed to follow
2166something: a template character or a ()-group. See L<perlfunc/pack>.
2167
fe13d51d 2168=item %s had compilation errors.
6df41af2
GS
2169
2170(F) The final summary message when a C<perl -c> fails.
2171
a0d0e21e
LW
2172=item Had to create %s unexpectedly
2173
be771a83
GS
2174(S internal) A routine asked for a symbol from a symbol table that ought
2175to have existed already, but for some reason it didn't, and had to be
2176created on an emergency basis to prevent a core dump.
a0d0e21e
LW
2177
2178=item Hash %%s missing the % in argument %d of %s()
2179
be771a83
GS
2180(D deprecated) Really old Perl let you omit the % on hash names in some
2181spots. This is now heavily deprecated.
a0d0e21e 2182
6df41af2
GS
2183=item %s has too many errors
2184
2185(F) The parser has given up trying to parse the program after 10 errors.
2186Further error messages would likely be uninformative.
2187
252aa082
JH
2188=item Hexadecimal number > 0xffffffff non-portable
2189
e476b1b5 2190(W portable) The hexadecimal number you specified is larger than 2**32-1
9e24b6e2
JH
2191(4294967295) and therefore non-portable between systems. See
2192L<perlport> for more on portability concerns.
252aa082 2193
8903cb82 2194=item Identifier too long
2195
2196(F) Perl limits identifiers (names for variables, functions, etc.) to
fc36a67e 2197about 250 characters for simple names, and somewhat more for compound
be771a83
GS
2198names (like C<$A::B>). You've exceeded Perl's limits. Future versions
2199of Perl are likely to eliminate these arbitrary limitations.
8903cb82 2200
e0e4a6e3
FC
2201=item Ignoring zero length \N{} in character class in regex; marked by
2202S<<-- HERE> in m/%s/
fc8cd66c 2203
b5e3739b
FC
2204(W regexp) Named Unicode character escapes C<(\N{...})> may return a
2205zero-length sequence. When such an escape is used in a character class
2206its behaviour is not well defined. Check that the correct escape has
fc8cd66c
YO
2207been used, and the correct charname handler is in scope.
2208
6df41af2 2209=item Illegal binary digit %s
f675dbe5 2210
6df41af2 2211(F) You used a digit other than 0 or 1 in a binary number.
f675dbe5 2212
6df41af2 2213=item Illegal binary digit %s ignored
a0d0e21e 2214
be771a83
GS
2215(W digit) You may have tried to use a digit other than 0 or 1 in a
2216binary number. Interpretation of the binary number stopped before the
2217offending digit.
a0d0e21e 2218
6597eb22
FC
2219=item Illegal character after '_' in prototype for %s : %s
2220
e4d150f1
FC
2221(W illegalproto) An illegal character was found in a prototype
2222declaration. The '_' in a prototype must be followed by a ';',
2223indicating the rest of the parameters are optional, or one of '@'
2224or '%', since those two will accept 0 or more final parameters.
6597eb22 2225
78d0fecf 2226=item Illegal character \%o (carriage return)
4fdae800 2227
d5898338 2228(F) Perl normally treats carriage returns in the program text as it
be771a83
GS
2229would any other whitespace, which means you should never see this error
2230when Perl was built using standard options. For some reason, your
2231version of Perl appears to have been built without this support. Talk
2232to your Perl administrator.
4fdae800 2233
d37a9538
ST
2234=item Illegal character in prototype for %s : %s
2235
197afce1 2236(W illegalproto) An illegal character was found in a prototype declaration.
2e9cc7ef 2237Legal characters in prototypes are $, @, %, *, ;, [, ], &, \, and +.
30d9c59b
Z
2238Perhaps you were trying to write a subroutine signature but didn't enable
2239that feature first (C<use feature 'signatures'>), so your signature was
2240instead interpreted as a bad prototype.
d37a9538 2241
904d85c5
RGS
2242=item Illegal declaration of anonymous subroutine
2243
2244(F) When using the C<sub> keyword to construct an anonymous subroutine,
6903afa2 2245you must always specify a block of code. See L<perlsub>.
904d85c5 2246
8e742a20
MHM
2247=item Illegal declaration of subroutine %s
2248
6903afa2 2249(F) A subroutine was not declared correctly. See L<perlsub>.
8e742a20 2250
a0d0e21e
LW
2251=item Illegal division by zero
2252
be771a83
GS
2253(F) You tried to divide a number by 0. Either something was wrong in
2254your logic, or you need to put a conditional in to guard against
2255meaningless input.
a0d0e21e 2256
6df41af2
GS
2257=item Illegal hexadecimal digit %s ignored
2258
be771a83
GS
2259(W digit) You may have tried to use a character other than 0 - 9 or
2260A - F, a - f in a hexadecimal number. Interpretation of the hexadecimal
2261number stopped before the illegal character.
6df41af2 2262
a0d0e21e
LW
2263=item Illegal modulus zero
2264
be771a83
GS
2265(F) You tried to divide a number by 0 to get the remainder. Most
2266numbers don't take to this kindly.
a0d0e21e 2267
6df41af2 2268=item Illegal number of bits in vec
399388f4 2269
6df41af2
GS
2270(F) The number of bits in vec() (the third argument) must be a power of
2271two from 1 to 32 (or 64, if your platform supports that).
399388f4
GS
2272
2273=item Illegal octal digit %s
a0d0e21e 2274
d1be9408 2275(F) You used an 8 or 9 in an octal number.
a0d0e21e 2276
399388f4 2277=item Illegal octal digit %s ignored
748a9306 2278
d1be9408 2279(W digit) You may have tried to use an 8 or 9 in an octal number.
75b44862 2280Interpretation of the octal number stopped before the 8 or 9.
748a9306 2281
e0e4a6e3 2282=item Illegal pattern in regex; marked by S<<-- HERE> in m/%s/
c608e803 2283
675fa9ff 2284(F) You wrote something like
c608e803
KW
2285
2286 (?+foo)
2287
2288The C<"+"> is valid only when followed by digits, indicating a
2289capturing group. See
2290L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>.
2291
fe13d51d 2292=item Illegal switch in PERL5OPT: -%c
6ff81951 2293
6df41af2 2294(X) The PERL5OPT environment variable may only be used to set the
646ca9b2 2295following switches: B<-[CDIMUdmtw]>.
6ff81951 2296
6df41af2 2297=item Ill-formed CRTL environ value "%s"
81e118e0 2298
75b44862 2299(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's
be771a83
GS
2300internal environ array, and encountered an element without the C<=>
2301delimiter used to separate keys from values. The element is ignored.
09bef843 2302
6df41af2 2303=item Ill-formed message in prime_env_iter: |%s|
54310121 2304
be771a83
GS
2305(W internal) A warning peculiar to VMS. Perl tried to read a logical
2306name or CLI symbol definition when preparing to iterate over %ENV, and
2307didn't see the expected delimiter between key and value, so the line was
2308ignored.
54310121 2309
6df41af2 2310=item (in cleanup) %s
9607fc9c 2311
be771a83
GS
2312(W misc) This prefix usually indicates that a DESTROY() method raised
2313the indicated exception. Since destructors are usually called by the
2314system at arbitrary points during execution, and often a vast number of
2315times, the warning is issued only once for any number of failures that
2316would otherwise result in the same message being repeated.
6df41af2 2317
be771a83
GS
2318Failure of user callbacks dispatched using the C<G_KEEPERR> flag could
2319also result in this warning. See L<perlcall/G_KEEPERR>.
9607fc9c 2320
e0e4a6e3
FC
2321=item Incomplete expression within '(?[ ])' in regex; marked by S<<-- HERE>
2322in m/%s/
0d0b4b3b 2323
675fa9ff 2324(F) There was a syntax error within the C<(?[ ])>. This can happen if the
0d0b4b3b
KW
2325expression inside the construct was completely empty, or if there are
2326too many or few operands for the number of operators. Perl is not smart
2327enough to give you a more precise indication as to what is wrong.
2328
6fbc9859
MH
2329=item Inconsistent hierarchy during C3 merge of class '%s': merging failed on
2330parent '%s'
2c7d6b9c
RGS
2331
2332(F) The method resolution order (MRO) of the given class is not
2333C3-consistent, and you have enabled the C3 MRO for this class. See the C3
2334documentation in L<mro> for more information.
2335
979699d9
JH
2336=item In EBCDIC the v-string components cannot exceed 2147483647
2337
2338(F) An error peculiar to EBCDIC. Internally, v-strings are stored as
2339Unicode code points, and encoded in EBCDIC as UTF-EBCDIC. The UTF-EBCDIC
2340encoding is limited to code points no larger than 2147483647 (0x7FFFFFFF).
2341
6a2ed79a 2342=item Infinite recursion in regex
1a147d38
YO
2343
2344(F) You used a pattern that references itself without consuming any input
6903afa2 2345text. You should check the pattern to ensure that recursive patterns
1a147d38
YO
2346either consume text or fail.
2347
6dbe9451
NC
2348=item Initialization of state variables in list context currently forbidden
2349
6903afa2
FC
2350(F) Currently the implementation of "state" only permits the
2351initialization of scalar variables in scalar context. Re-write
2352C<state ($a) = 42> as C<state $a = 42> to change from list to scalar
2353context. Constructions such as C<state (@a) = foo()> will be
2354supported in a future perl release.
6dbe9451 2355
2186f873
FC
2356=item %%s[%s] in scalar context better written as $%s[%s]
2357
2358(W syntax) In scalar context, you've used an array index/value slice
2359(indicated by %) to select a single element of an array. Generally
2360it's better to ask for a scalar value (indicated by $). The difference
2361is that C<$foo[&bar]> always behaves like a scalar, both in the value it
2362returns and when evaluating its argument, while C<%foo[&bar]> provides
2363a list context to its subscript, which can do weird things if you're
2364expecting only one subscript. When called in list context, it also
2365returns the index (what C<&bar> returns) in addition to the value.
2366
2367=item %%s{%s} in scalar context better written as $%s{%s}
2368
2369(W syntax) In scalar context, you've used a hash key/value slice
2370(indicated by %) to select a single element of a hash. Generally it's
2371better to ask for a scalar value (indicated by $). The difference
2372is that C<$foo{&bar}> always behaves like a scalar, both in the value
2373it returns and when evaluating its argument, while C<@foo{&bar}> and
2374provides a list context to its subscript, which can do weird things
2375if you're expecting only one subscript. When called in list context,
2376it also returns the key in addition to the value.
2377
a0d0e21e
LW
2378=item Insecure dependency in %s
2379
8b1a09fc 2380(F) You tried to do something that the tainting mechanism didn't like.
be771a83
GS
2381The tainting mechanism is turned on when you're running setuid or
2382setgid, or when you specify B<-T> to turn it on explicitly. The
2383tainting mechanism labels all data that's derived directly or indirectly
2384from the user, who is considered to be unworthy of your trust. If any
2385such data is used in a "dangerous" operation, you get this error. See
2386L<perlsec> for more information.
a0d0e21e
LW
2387
2388=item Insecure directory in %s
2389
be771a83
GS
2390(F) You can't use system(), exec(), or a piped open in a setuid or
2391setgid script if C<$ENV{PATH}> contains a directory that is writable by
df98f984
RGS
2392the world. Also, the PATH must not contain any relative directory.
2393See L<perlsec>.
a0d0e21e 2394
62f468fc 2395=item Insecure $ENV{%s} while running %s
a0d0e21e
LW
2396
2397(F) You can't use system(), exec(), or a piped open in a setuid or
62f468fc 2398setgid script if any of C<$ENV{PATH}>, C<$ENV{IFS}>, C<$ENV{CDPATH}>,
332d5f78
SR
2399C<$ENV{ENV}>, C<$ENV{BASH_ENV}> or C<$ENV{TERM}> are derived from data
2400supplied (or potentially supplied) by the user. The script must set
2401the path to a known value, using trustworthy data. See L<perlsec>.
a0d0e21e 2402
0e9be77f
DM
2403=item Insecure user-defined property %s
2404
2405(F) Perl detected tainted data when trying to compile a regular
2406expression that contains a call to a user-defined character property
2407function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
2408See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
2409
e0e4a6e3
FC
2410=item In '(?...)', splitting the initial '(?' is deprecated in regex;
2411marked by S<<-- HERE> in m/%s/
675fa9ff
FC
2412
2413(D regexp, deprecated) The two-character sequence C<"(?"> in
2414this context in a regular expression pattern should be an
2415indivisible token, with nothing intervening between the C<"(">
2416and the C<"?">, but you separated them. Due to an accident of
2417implementation, this prohibition was not enforced, but we do
2418plan to forbid it in a future Perl version. This message
2419serves as giving you fair warning of this pending change.
2420
b9ef414d
FC
2421=item Integer overflow in format string for %s
2422
2423(F) The indexes and widths specified in the format string of C<printf()>
2424or C<sprintf()> are too large. The numbers must not overflow the size of
2425integers for your architecture.
2426
a7ae9550
GS
2427=item Integer overflow in %s number
2428
35928bc5 2429(S overflow) The hexadecimal, octal or binary number you have specified
be771a83
GS
2430either as a literal or as an argument to hex() or oct() is too big for
2431your architecture, and has been converted to a floating point number.
2432On a 32-bit architecture the largest hexadecimal, octal or binary number
9e24b6e2
JH
2433representable without overflow is 0xFFFFFFFF, 037777777777, or
24340b11111111111111111111111111111111 respectively. Note that Perl
2435transparently promotes all numbers to a floating point representation
2436internally--subject to loss of precision errors in subsequent
2437operations.
bbce6d69 2438
fc89ca81
FC
2439=item Integer overflow in srand
2440
2441(S overflow) The number you have passed to srand is too big to fit
2442in your architecture's integer representation. The number has been
2443replaced with the largest integer supported (0xFFFFFFFF on 32-bit
2444architectures). This means you may be getting less randomness than
2445you expect, because different random seeds above the maximum will
2446return the same sequence of random numbers.
2447
46314c13
JP
2448=item Integer overflow in version
2449
18da5252
FC
2450=item Integer overflow in version %d
2451
784d71ed
FC
2452(W overflow) Some portion of a version initialization is too large for
2453the size of integers for your architecture. This is not a warning
f084e84f 2454because there is no rational reason for a version to try and use an
784d71ed
FC
2455element larger than typically 2**32. This is usually caused by trying
2456to use some odd mathematical operation as a version, like 100/9.
46314c13 2457
e0e4a6e3 2458=item Internal disaster in regex; marked by S<<-- HERE> in m/%s/
6df41af2
GS
2459
2460(P) Something went badly wrong in the regular expression parser.
e0e4a6e3 2461The S<<-- HERE> shows whereabouts in the regular expression the problem was
b45f050a
JF
2462discovered.
2463
748a9306
LW
2464=item Internal inconsistency in tracking vforks
2465
be771a83
GS
2466(S) A warning peculiar to VMS. Perl keeps track of the number of times
2467you've called C<fork> and C<exec>, to determine whether the current call
2468to C<exec> should affect the current script or a subprocess (see
2469L<perlvms/"exec LIST">). Somehow, this count has become scrambled, so
2470Perl is making a guess and treating this C<exec> as a request to
2471terminate the Perl script and execute the specified command.
748a9306 2472
870978ae
FC
2473=item internal %<num>p might conflict with future printf extensions
2474
2475(S internal) Perl's internal routine that handles C<printf> and C<sprintf>
2476formatting follows a slightly different set of rules when called from
2477C or XS code. Specifically, formats consisting of digits followed
2478by "p" (e.g., "%7p") are reserved for future use. If you see this
2479message, then an XS module tried to call that routine with one such
2480reserved format.
2481
e0e4a6e3 2482=item Internal urp in regex; marked by S<<-- HERE> in m/%s/
b45f050a 2483
fa816bf3 2484(P) Something went badly awry in the regular expression parser. The
e0e4a6e3 2485S<<-- HERE> shows whereabouts in the regular expression the problem was
7253e4e3 2486discovered.
a0d0e21e 2487
6df41af2
GS
2488=item %s (...) interpreted as function
2489
75b44862 2490(W syntax) You've run afoul of the rule that says that any list operator
be771a83 2491followed by parentheses turns into a function, with all the list
64977eb6 2492operators arguments found inside the parentheses. See
13a2d996 2493L<perlop/Terms and List Operators (Leftward)>.
6df41af2 2494
09bef843
SB
2495=item Invalid %s attribute: %s
2496
a4a4c9e2 2497(F) The indicated attribute for a subroutine or variable was not recognized
09bef843
SB
2498by Perl or by a user-supplied handler. See L<attributes>.
2499
2500=item Invalid %s attributes: %s
2501
a4a4c9e2 2502(F) The indicated attributes for a subroutine or variable were not
be771a83 2503recognized by Perl or by a user-supplied handler. See L<attributes>.
09bef843 2504
e0e4a6e3
FC
2505=item Invalid character in charnames alias definition; marked by
2506S<<-- HERE> in '%s
225fb84f
KW
2507
2508(F) You tried to create a custom alias for a character name, with
2509the C<:alias> option to C<use charnames> and the specified character in
2510the indicated name isn't valid. See L<charnames/CUSTOM ALIASES>.
2511
c8028aa6
TC
2512=item Invalid \0 character in %s for %s: %s\0%s
2513
fa3234e3
FC
2514(W syscalls) Embedded \0 characters in pathnames or other system call
2515arguments produce a warning as of 5.20. The parts after the \0 were
2516formerly ignored by system calls.
c8028aa6 2517
e0e4a6e3 2518=item Invalid character in \N{...}; marked by S<<-- HERE> in \N{%s}
a690c7c4
FC
2519
2520(F) Only certain characters are valid for character names. The
2521indicated one isn't. See L<charnames/CUSTOM ALIASES>.
2522
c635e13b 2523=item Invalid conversion in %s: "%s"
2524
be771a83
GS
2525(W printf) Perl does not understand the given format conversion. See
2526L<perlfunc/sprintf>.
c635e13b 2527
e0e4a6e3
FC
2528=item Invalid escape in the specified encoding in regex; marked by
2529S<<-- HERE> in m/%s/
9e08bc66 2530
98d31c73 2531(W regexp)(F) The numeric escape (for example C<\xHH>) of value < 256
9e08bc66
TS
2532didn't correspond to a single character through the conversion
2533from the encoding specified by the encoding pragma.
98d31c73
FC
2534The escape was replaced with REPLACEMENT CHARACTER (U+FFFD)
2535instead, except within S<C<(?[ ])>>, where it is a fatal error.
e0e4a6e3 2536The S<<-- HERE> shows whereabouts in the regular expression the
9e08bc66
TS
2537escape was discovered.
2538
8149aa9f
FC
2539=item Invalid hexadecimal number in \N{U+...}
2540
e0e4a6e3
FC
2541=item Invalid hexadecimal number in \N{U+...} in regex; marked by
2542S<<-- HERE> in m/%s/
aec0ef10 2543
8149aa9f 2544(F) The character constant represented by C<...> is not a valid hexadecimal
74f8e9e3
FC
2545number. Either it is empty, or you tried to use a character other than
25460 - 9 or A - F, a - f in a hexadecimal number.
8149aa9f 2547
6651ba0b
FC
2548=item Invalid module name %s with -%c option: contains single ':'
2549
2550(F) The module argument to perl's B<-m> and B<-M> command-line options
2551cannot contain single colons in the module name, but only in the
2552arguments after "=". In other words, B<-MFoo::Bar=:baz> is ok, but
2553B<-MFoo:Bar=baz> is not.
2554
2c7d6b9c
RGS
2555=item Invalid mro name: '%s'
2556
162a3e34
FC
2557(F) You tried to C<mro::set_mro("classname", "foo")> or C<use mro 'foo'>,
2558where C<foo> is not a valid method resolution order (MRO). Currently,
2559the only valid ones supported are C<dfs> and C<c3>, unless you have loaded
2560a module that is a MRO plugin. See L<mro> and L<perlmroapi>.
2c7d6b9c 2561
40e4140b
FC
2562=item Invalid negative number (%s) in chr
2563
2564(W utf8) You passed a negative number to C<chr>. Negative numbers are
2565not valid characters numbers, so it return the Unicode replacement
2566character (U+FFFD).
2567
6651ba0b
FC
2568=item invalid option -D%c, use -D'' to see choices
2569
8ff21bfe
FC
2570(S debugging) Perl was called with invalid debugger flags. Call perl
2571with the B<-D> option with no flags to see the list of acceptable values.
982c4ecb 2572See also L<perlrun/-Dletters>.
6651ba0b 2573
e0e4a6e3 2574=item Invalid [] range "%s" in regex; marked by S<<-- HERE> in m/%s/
6df41af2
GS
2575
2576(F) The range specified in a character class had a minimum character
7253e4e3
RK
2577greater than the maximum character. One possibility is that you forgot the
2578C<{}> from your ending C<\x{}> - C<\x> without the curly braces can go only
e0e4a6e3 2579up to C<ff>. The S<<-- HERE> shows whereabouts in the regular expression the
7253e4e3 2580problem was discovered. See L<perlre>.
6df41af2 2581
d1573ac7 2582=item Invalid range "%s" in transliteration operator
c2e66d9e
GS
2583
2584(F) The range specified in the tr/// or y/// operator had a minimum
2585character greater than the maximum character. See L<perlop>.
2586
09bef843
SB
2587=item Invalid separator character %s in attribute list
2588
0120eecf 2589(F) Something other than a colon or whitespace was seen between the
be771a83
GS
2590elements of an attribute list. If the previous attribute had a
2591parenthesised parameter list, perhaps that list was terminated too soon.
2592See L<attributes>.
09bef843 2593
b4581f09
JH
2594=item Invalid separator character %s in PerlIO layer specification %s
2595
2bfc5f71
FC
2596(W layer) When pushing layers onto the Perl I/O system, something other
2597than a colon or whitespace was seen between the elements of a layer list.
b4581f09
JH
2598If the previous attribute had a parenthesised parameter list, perhaps that
2599list was terminated too soon.
2600
2c86d456
DG
2601=item Invalid strict version format (%s)
2602
fa816bf3 2603(F) A version number did not meet the "strict" criteria for versions.
2c86d456
DG
2604A "strict" version number is a positive decimal number (integer or
2605decimal-fraction) without exponentiation or else a dotted-decimal
2606v-string with a leading 'v' character and at least three components.
a6485a24 2607The parenthesized text indicates which criteria were not met.
2c86d456
DG
2608See the L<version> module for more details on allowed version formats.
2609
49704364 2610=item Invalid type '%s' in %s
96e4d5b1 2611
49704364
WL
2612(F) The given character is not a valid pack or unpack type.
2613See L<perlfunc/pack>.
6728c851 2614
49704364 2615(W) The given character is not a valid pack or unpack type but used to be
75b44862 2616silently ignored.
96e4d5b1 2617
2c86d456
DG
2618=item Invalid version format (%s)
2619
fa816bf3 2620(F) A version number did not meet the "lax" criteria for versions.
2c86d456
DG
2621A "lax" version number is a positive decimal number (integer or
2622decimal-fraction) without exponentiation or else a dotted-decimal
fa816bf3
FC
2623v-string. If the v-string has fewer than three components, it
2624must have a leading 'v' character. Otherwise, the leading 'v' is
2625optional. Both decimal and dotted-decimal versions may have a
2626trailing "alpha" component separated by an underscore character
2627after a fractional or dotted-decimal component. The parenthesized
2628text indicates which criteria were not met. See the L<version> module
2629for more details on allowed version formats.
46314c13 2630
798ae1b7
DG
2631=item Invalid version object
2632
fa816bf3
FC
2633(F) The internal structure of the version object was invalid.
2634Perhaps the internals were modified directly in some way or
2635an arbitrary reference was blessed into the "version" class.
798ae1b7 2636
e0e4a6e3
FC
2637=item In '(*VERB...)', splitting the initial '(*' is deprecated in regex;
2638marked by S<<-- HERE> in m/%s/
675fa9ff
FC
2639
2640(D regexp, deprecated) The two-character sequence C<"(*"> in
2641this context in a regular expression pattern should be an
2642indivisible token, with nothing intervening between the C<"(">
f26c79ba 2643and the C<"*">, but you separated them. Due to an accident of
675fa9ff
FC
2644implementation, this prohibition was not enforced, but we do
2645plan to forbid it in a future Perl version. This message
2646serves as giving you fair warning of this pending change.
2647
a0d0e21e
LW
2648=item ioctl is not implemented
2649
2650(F) Your machine apparently doesn't implement ioctl(), which is pretty
2651strange for a machine that supports C.
2652
c289d2f7
JH
2653=item ioctl() on unopened %s
2654
2655(W unopened) You tried ioctl() on a filehandle that was never opened.
34b6fd5e 2656Check your control flow and number of arguments.
c289d2f7 2657
fe13d51d 2658=item IO layers (like '%s') unavailable
363c40c4
SB
2659
2660(F) Your Perl has not been configured to have PerlIO, and therefore
34b6fd5e 2661you cannot use IO layers. To have PerlIO, Perl must be configured
363c40c4
SB
2662with 'useperlio'.
2663
80cbd5ad
JH
2664=item IO::Socket::atmark not implemented on this architecture
2665
2666(F) Your machine doesn't implement the sockatmark() functionality,
34b6fd5e 2667neither as a system call nor an ioctl call (SIOCATMARK).
80cbd5ad 2668
4f650b80 2669=item $* is no longer supported
b4581f09 2670
4f650b80 2671(D deprecated, syntax) The special variable C<$*>, deprecated in older
ea9d9ebc 2672perls, has been removed as of 5.10.0 and is no longer supported. In
4f650b80
NC
2673previous versions of perl the use of C<$*> enabled or disabled multi-line
2674matching within a string.
4fd19576
B
2675
2676Instead of using C<$*> you should use the C</m> (and maybe C</s>) regexp
6903afa2
FC
2677modifiers. You can enable C</m> for a lexical scope (even a whole file)
2678with C<use re '/m'>. (In older versions: when C<$*> was set to a true value
570dedd4 2679then all regular expressions behaved as if they were written using C</m>.)
b4581f09 2680
8ae1fe26
RGS
2681=item $# is no longer supported
2682
a58ac25e 2683(D deprecated, syntax) The special variable C<$#>, deprecated in older
ea9d9ebc 2684perls, has been removed as of 5.10.0 and is no longer supported. You
a58ac25e 2685should use the printf/sprintf functions instead.
8ae1fe26 2686
ccf3535a 2687=item '%s' is not a code reference
6ad11d81 2688
6903afa2
FC
2689(W overload) The second (fourth, sixth, ...) argument of
2690overload::constant needs to be a code reference. Either
2691an anonymous subroutine, or a reference to a subroutine.
6ad11d81 2692
ccf3535a 2693=item '%s' is not an overloadable type
6ad11d81 2694
04a80ee0
RGS
2695(W overload) You tried to overload a constant type the overload package is
2696unaware of.
6ad11d81 2697
5a25739d
FC
2698=item -i used with no filenames on the command line, reading from STDIN
2699
2700(S inplace) The C<-i> option was passed on the command line, indicating
2701that the script is intended to edit files in place, but no files were
2702given. This is usually a mistake, since editing STDIN in place doesn't
2703make sense, and can be confusing because it can make perl look like
2704it is hanging when it is really just trying to read from STDIN. You
2705should either pass a filename to edit, or remove C<-i> from the command
2706line. See L<perlrun> for more details.
2707
aec0ef10 2708=item Junk on end of regexp in regex m/%s/
a0d0e21e
LW
2709
2710(P) The regular expression parser is confused.
2711
0953b66b
FC
2712=item keys on reference is experimental
2713
0773cb3e
FC
2714(S experimental::autoderef) C<keys> with a scalar argument is experimental
2715and may change or be removed in a future Perl version. If you want to
2716take the risk of using this feature, simply disable this warning:
0953b66b 2717
d401967c 2718 no warnings "experimental::autoderef";
0953b66b 2719
a0d0e21e
LW
2720=item Label not found for "last %s"
2721
be771a83
GS
2722(F) You named a loop to break out of, but you're not currently in a loop
2723of that name, not even if you count where you were called from. See
2724L<perlfunc/last>.
a0d0e21e
LW
2725
2726=item Label not found for "next %s"
2727
2728(F) You named a loop to continue, but you're not currently in a loop of
2729that name, not even if you count where you were called from. See
2730L<perlfunc/last>.
2731
2732=item Label not found for "redo %s"
2733
2734(F) You named a loop to restart, but you're not currently in a loop of
2735that name, not even if you count where you were called from. See
2736L<perlfunc/last>.
2737
85ab1d1d 2738=item leaving effective %s failed
5ff3f7a4 2739
85ab1d1d 2740(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
2741effective uids or gids failed.
2742
49704364
WL
2743=item length/code after end of string in unpack
2744
d7f8936a 2745(F) While unpacking, the string buffer was already used up when an unpack
6903afa2
FC
2746length/code combination tried to obtain more data. This results in
2747an undefined value for the length. See L<perlfunc/pack>.
49704364 2748
25e26107 2749=item length() used on %s (did you mean "scalar(%s)"?)
e508c8a4 2750
0d46a4e7
FC
2751(W syntax) You used length() on either an array or a hash when you
2752probably wanted a count of the items.
e508c8a4
MH
2753
2754Array size can be obtained by doing:
2755
2756 scalar(@array);
2757
2758The number of items in a hash can be obtained by doing:
2759
2760 scalar(keys %hash);
2761
f0e67a1d
Z
2762=item Lexing code attempted to stuff non-Latin-1 character into Latin-1 input
2763
d4fe7078
RS
2764(F) An extension is attempting to insert text into the current parse
2765(using L<lex_stuff_pvn|perlapi/lex_stuff_pvn> or similar), but tried to insert a character that
2766couldn't be part of the current input. This is an inherent pitfall
2767of the stuffing mechanism, and one of the reasons to avoid it. Where
6903afa2 2768it is necessary to stuff, stuffing only plain ASCII is recommended.
f0e67a1d
Z
2769
2770=item Lexing code internal error (%s)
2771
2772(F) Lexing code supplied by an extension violated the lexer's API in a
2773detectable way.
2774
69282e91 2775=item listen() on closed socket %s
a0d0e21e 2776
be771a83
GS
2777(W closed) You tried to do a listen on a closed socket. Did you forget
2778to check the return value of your socket() call? See
2779L<perlfunc/listen>.
a0d0e21e 2780
6651ba0b
FC
2781=item List form of piped open not implemented
2782
2783(F) On some platforms, notably Windows, the three-or-more-arguments
2784form of C<open> does not support pipes, such as C<open($pipe, '|-', @args)>.
2785Use the two-argument C<open($pipe, '|prog arg1 arg2...')> form instead.
2786
bcd05b94 2787=item localtime(%f) too large
8b56d6ff 2788
e9200be3 2789(W overflow) You called C<localtime> with a number that was larger
fc003d4b 2790than it can reliably handle and C<localtime> probably returned the
6903afa2 2791wrong date. This warning is also triggered with NaN (the special
fc003d4b
MS
2792not-a-number value).
2793
bcd05b94 2794=item localtime(%f) too small
fc003d4b 2795
e9200be3 2796(W overflow) You called C<localtime> with a number that was smaller
fc003d4b 2797than it can reliably handle and C<localtime> probably returned the
e7a1a147 2798wrong date.
8b56d6ff 2799
58e23c8d 2800=item Lookbehind longer than %d not implemented in regex m/%s/
b45f050a
JF
2801
2802(F) There is currently a limit on the length of string which lookbehind can
6903afa2 2803handle. This restriction may be eased in a future release.
2e50fd82 2804
b88df990
NC
2805=item Lost precision when %s %f by 1
2806
e63e8a91
FC
2807(W imprecision) The value you attempted to increment or decrement by one
2808is too large for the underlying floating point representation to store
2809accurately, hence the target of C<++> or C<--> is unchanged. Perl issues this
2810warning because it has already switched from integers to floating point
2811when values are too large for integers, and now even floating point is
2812insufficient. You may wish to switch to using L<Math::BigInt> explicitly.
b88df990 2813
93fad930 2814=item lstat() on filehandle%s
2f7da168
RK
2815
2816(W io) You tried to do an lstat on a filehandle. What did you mean
2817by that? lstat() makes sense only on filenames. (Perl did a fstat()
2818instead on the filehandle.)
2819
345d70e3 2820=item lvalue attribute %s already-defined subroutine
bb3abb05 2821
345d70e3
FC
2822(W misc) Although L<attributes.pm|attributes> allows this, turning the lvalue
2823attribute on or off on a Perl subroutine that is already defined
2824does not always work properly. It may or may not do what you
2825want, depending on what code is inside the subroutine, with exact
2826details subject to change between Perl versions. Only do this
2827if you really know what you are doing.
bb3abb05 2828
885ef6f5
GG
2829=item lvalue attribute ignored after the subroutine has been defined
2830
345d70e3
FC
2831(W misc) Using the C<:lvalue> declarative syntax to make a Perl
2832subroutine an lvalue subroutine after it has been defined is
2833not permitted. To make the subroutine an lvalue subroutine,
2834add the lvalue attribute to the definition, or put the C<sub
2835foo :lvalue;> declaration before the definition.
2836
2837See also L<attributes.pm|attributes>.
885ef6f5 2838
6f1b3ab0
FC
2839=item Magical list constants are not supported
2840
2841(F) You assigned a magical array to a stash element, and then tried
2842to use the subroutine from the same slot. You are asking Perl to do
2843something it cannot do, details subject to change between Perl versions.
2844
2db62bbc 2845=item Malformed integer in [] in pack
49704364 2846
2db62bbc 2847(F) Between the brackets enclosing a numeric repeat count only digits
49704364
WL
2848are permitted. See L<perlfunc/pack>.
2849
2850=item Malformed integer in [] in unpack
2851
2db62bbc 2852(F) Between the brackets enclosing a numeric repeat count only digits
49704364
WL
2853are permitted. See L<perlfunc/pack>.
2854
6df41af2
GS
2855=item Malformed PERLLIB_PREFIX
2856
2857(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
2858
2859 prefix1;prefix2
2860
2861or
6df41af2
GS
2862 prefix1 prefix2
2863
be771a83
GS
2864with nonempty prefix1 and prefix2. If C<prefix1> is indeed a prefix of
2865a builtin library search path, prefix2 is substituted. The error may
2866appear if components are not found, or are too long. See
fecfaeb8 2867"PERLLIB_PREFIX" in L<perlos2>.
6df41af2 2868
2f758a16
ST
2869=item Malformed prototype for %s: %s
2870
d37a9538
ST
2871(F) You tried to use a function with a malformed prototype. The
2872syntax of function prototypes is given a brief compile-time check for
2873obvious errors like invalid characters. A more rigorous check is run
2874when the function is called.
30d9c59b
Z
2875Perhaps the function's author was trying to write a subroutine signature
2876but didn't enable that feature first (C<use feature 'signatures'>),
2877so the signature was instead interpreted as a bad prototype.
2f758a16 2878
ba210ebe
JH
2879=item Malformed UTF-8 character (%s)
2880
4d6f11e5 2881(S utf8)(F) Perl detected a string that didn't comply with UTF-8
2575c402 2882encoding rules, even though it had the UTF8 flag on.
ba210ebe 2883
2575c402
JW
2884One possible cause is that you set the UTF8 flag yourself for data that
2885you thought to be in UTF-8 but it wasn't (it was for example legacy
6903afa2 28868-bit data). To guard against this, you can use Encode::decode_utf8.
2575c402
JW
2887
2888If you use the C<:encoding(UTF-8)> PerlIO layer for input, invalid byte
2889sequences are handled gracefully, but if you use C<:utf8>, the flag is
2890set without validating the data, possibly resulting in this error
2891message.
2892
2893See also L<Encode/"Handling Malformed Data">.
901b21bf 2894
107160e2
KW
2895=item Malformed UTF-8 character immediately after '%s'
2896
2897(F) You said C<use utf8>, but the program file doesn't comply with UTF-8
2898encoding rules. The message prints out the properly encoded characters
2899just before the first bad one. If C<utf8> warnings are enabled, a
2900warning is generated that gives more details about the type of
2901malformation.
2902
bde9e88d 2903=item Malformed UTF-8 returned by \N{%s} immediately after '%s'
ff3f963a
KW
2904
2905(F) The charnames handler returned malformed UTF-8.
2906
4a5d3a93
FC
2907=item Malformed UTF-8 string in '%c' format in unpack
2908
2909(F) You tried to unpack something that didn't comply with UTF-8 encoding
2910rules and perl was unable to guess how to make more progress.
2911
f337b084
TH
2912=item Malformed UTF-8 string in pack
2913
2914(F) You tried to pack something that didn't comply with UTF-8 encoding
2915rules and perl was unable to guess how to make more progress.
2916
2917=item Malformed UTF-8 string in unpack
2918
2919(F) You tried to unpack something that didn't comply with UTF-8 encoding
2920rules and perl was unable to guess how to make more progress.
2921
4a5d3a93 2922=item Malformed UTF-16 surrogate
f337b084 2923
4a5d3a93
FC
2924(F) Perl thought it was reading UTF-16 encoded character data but while
2925doing it Perl met a malformed Unicode surrogate.
2926
30d9c59b
Z
2927=item Mandatory parameter follows optional parameter
2928
2929(F) In a subroutine signature, you wrote something like "$a = undef,
2930$b", making an earlier parameter optional and a later one mandatory.
2931Parameters are filled from left to right, so it's impossible for the
2932caller to omit an earlier one and pass a later one. If you want to act
2933as if the parameters are filled from right to left, declare the rightmost
2934optional and then shuffle the parameters around in the subroutine's body.
2935
2d88a86a
KW
2936=item Matched non-Unicode code point 0x%X against Unicode property; may
2937not be portable
2938
2939(S non_unicode) Perl allows strings to contain a superset of
2940Unicode code points; each code point may be as large as what is storable
2941in an unsigned integer on your system, but these may not be accepted by
2942other languages/systems. This message occurs when you matched a string
2943containing such a code point against a regular expression pattern, and
2944the code point was matched against a Unicode property, C<\p{...}> or
2945C<\P{...}>. Unicode properties are only defined on Unicode code points,
2946so the result of this match is undefined by Unicode, but Perl (starting
2947in v5.20) treats non-Unicode code points as if they were typical
2948unassigned Unicode ones, and matched this one accordingly. Whether a
2949given property matches these code points or not is specified in
2950L<perluniprops/Properties accessible through \p{} and \P{}>.
2951
2952This message is suppressed (unless it has been made fatal) if it is
2953immaterial to the results of the match if the code point is Unicode or
2954not. For example, the property C<\p{ASCII_Hex_Digit}> only can match
2955the 22 characters C<[0-9A-Fa-f]>, so obviously all other code points,
2956Unicode or not, won't match it. (And C<\P{ASCII_Hex_Digit}> will match
2957every code point except these 22.)
2958
2959Getting this message indicates that the outcome of the match arguably
2960should have been the opposite of what actually happened. If you think
2961that is the case, you may wish to make the C<non_unicode> warnings
2962category fatal; if you agree with Perl's decision, you may wish to turn
2963off this category.
2964
2965See L<perlunicode/Beyond Unicode code points> for more information.
2966
e0e4a6e3
FC
2967=item %s matches null string many times in regex; marked by S<<-- HERE> in
2968m/%s/
4a5d3a93
FC
2969
2970(W regexp) The pattern you've specified would be an infinite loop if the
e0e4a6e3 2971regular expression engine didn't specifically check for that. The S<<-- HERE>
9e3ec65c 2972shows whereabouts in the regular expression the problem was discovered.
4a5d3a93 2973See L<perlre>.
f337b084 2974
de42a5a9 2975=item Maximal count of pending signals (%u) exceeded
2563cec5 2976
6903afa2 2977(F) Perl aborted due to too high a number of signals pending. This
2563cec5
IZ
2978usually indicates that your operating system tried to deliver signals
2979too fast (with a very high priority), starving the perl process from
2980resources it would need to reach a point where it can process signals
6903afa2 2981safely. (See L<perlipc/"Deferred Signals (Safe Signals)">.)
2563cec5 2982
25f58aea
PN
2983=item "%s" may clash with future reserved word
2984
2985(W) This warning may be due to running a perl5 script through a perl4
2986interpreter, especially if the word that is being warned about is
2987"use" or "my".
2988
0d2487cd 2989=item '%' may not be used in pack
6df41af2
GS
2990
2991(F) You can't pack a string by supplying a checksum, because the
be771a83
GS
2992checksumming process loses information, and you can't go the other way.
2993See L<perlfunc/unpack>.
6df41af2 2994
a0d0e21e
LW
2995=item Method for operation %s not found in package %s during blessing
2996
2997(F) An attempt was made to specify an entry in an overloading table that
e7ea3e70 2998doesn't resolve to a valid subroutine. See L<overload>.
a0d0e21e 2999
3cdd684c
TP
3000=item Method %s not permitted
3001
3002See Server error.
3003
a0d0e21e
LW
3004=item Might be a runaway multi-line %s string starting on line %d
3005
3006(S) An advisory indicating that the previous error may have been caused
3007by a missing delimiter on a string or pattern, because it eventually
3008ended earlier on the current line.
3009
3010=item Misplaced _ in number
3011
d4ced10d
JH
3012(W syntax) An underscore (underbar) in a numeric constant did not
3013separate two digits.
a0d0e21e 3014
7baa4690
HS
3015=item Missing argument in %s
3016
3017(W uninitialized) A printf-type format required more arguments than were
3018supplied.
3019
9e81e6a1
RGS
3020=item Missing argument to -%c
3021
3022(F) The argument to the indicated command line switch must follow
3023immediately after the switch, without intervening spaces.
3024
ff3f963a 3025=item Missing braces on \N{}
423cee85 3026
e0e4a6e3 3027=item Missing braces on \N{} in regex; marked by S<<-- HERE> in m/%s/
aec0ef10 3028
4a2d328f 3029(F) Wrong syntax of character name literal C<\N{charname}> within
532cb70d
FC
3030double-quotish context. This can also happen when there is a space
3031(or comment) between the C<\N> and the C<{> in a regex with the C</x> modifier.
3032This modifier does not change the requirement that the brace immediately
3033follow the C<\N>.
423cee85 3034
f0a2b745
KW
3035=item Missing braces on \o{}
3036
3037(F) A C<\o> must be followed immediately by a C<{> in double-quotish context.
3038
a0d0e21e
LW
3039=item Missing comma after first argument to %s function
3040
3041(F) While certain functions allow you to specify a filehandle or an
3042"indirect object" before the argument list, this ain't one of them.
3043
06eaf0bc
GS
3044=item Missing command in piped open
3045
be771a83
GS
3046(W pipe) You used the C<open(FH, "| command")> or
3047C<open(FH, "command |")> construction, but the command was missing or
3048blank.
06eaf0bc 3049
961ce445
RGS
3050=item Missing control char name in \c
3051
3052(F) A double-quoted string ended with "\c", without the required control
3053character name.
3054
591f5ca2
FC
3055=item Missing ']' in prototype for %s : %s
3056
bfe11873 3057(W illegalproto) A grouping was started with C<[> but never closed with C<]>.
591f5ca2 3058
8767b1ab 3059=item Missing name in "%s sub"
6df41af2 3060
87444db5 3061(F) The syntax for lexically scoped subroutines requires that
be771a83 3062they have a name with which they can be found.
6df41af2
GS
3063
3064=item Missing $ on loop variable
3065
be771a83
GS
3066(F) Apparently you've been programming in B<csh> too much. Variables
3067are always mentioned with the $ in Perl, unlike in the shells, where it
3068can vary from one line to the next.
6df41af2 3069
cc507455 3070=item (Missing operator before %s?)
748a9306 3071
56da5a46
RGS
3072(S syntax) This is an educated guess made in conjunction with the message
3073"%s found where operator expected". Often the missing operator is a comma.
748a9306 3074
e0e4a6e3 3075=item Missing right brace on \%c{} in regex; marked by S<<-- HERE> in m/%s/
ab13f0c7 3076
ff3f963a
KW
3077(F) Missing right brace in C<\x{...}>, C<\p{...}>, C<\P{...}>, or C<\N{...}>.
3078
4a68bf9d 3079=item Missing right brace on \N{} or unescaped left brace after \N
ff3f963a 3080
d32207c9
FC
3081(F) C<\N> has two meanings.
3082
3083The traditional one has it followed by a name enclosed in braces,
3084meaning the character (or sequence of characters) given by that
fa816bf3 3085name. Thus C<\N{ASTERISK}> is another way of writing C<*>, valid in both
d32207c9
FC
3086double-quoted strings and regular expression patterns. In patterns,
3087it doesn't have the meaning an unescaped C<*> does.
3088
3089Starting in Perl 5.12.0, C<\N> also can have an additional meaning (only)
3090in patterns, namely to match a non-newline character. (This is short
3091for C<[^\n]>, and like C<.> but is not affected by the C</s> regex modifier.)
3092
3093This can lead to some ambiguities. When C<\N> is not followed immediately
3094by a left brace, Perl assumes the C<[^\n]> meaning. Also, if the braces
3095form a valid quantifier such as C<\N{3}> or C<\N{5,}>, Perl assumes that this
3096means to match the given quantity of non-newlines (in these examples,
30973; and 5 or more, respectively). In all other case, where there is a
3098C<\N{> and a matching C<}>, Perl assumes that a character name is desired.
3099
3100However, if there is no matching C<}>, Perl doesn't know if it was
3101mistakenly omitted, or if C<[^\n]{> was desired, and raises this error.
3102If you meant the former, add the right brace; if you meant the latter,
3103escape the brace with a backslash, like so: C<\N\{>
ab13f0c7 3104
d98d5fff 3105=item Missing right curly or square bracket
a0d0e21e 3106
be771a83
GS
3107(F) The lexer counted more opening curly or square brackets than closing
3108ones. As a general rule, you'll find it's missing near the place you
3109were last editing.
a0d0e21e 3110
6df41af2
GS
3111=item (Missing semicolon on previous line?)
3112
56da5a46
RGS
3113(S syntax) This is an educated guess made in conjunction with the message
3114"%s found where operator expected". Don't automatically put a semicolon on
6df41af2
GS
3115the previous line just because you saw this message.
3116
a0d0e21e
LW
3117=item Modification of a read-only value attempted
3118
3119(F) You tried, directly or indirectly, to change the value of a
5f05dabc 3120constant. You didn't, of course, try "2 = 1", because the compiler
a0d0e21e
LW
3121catches that. But an easy way to do the same thing is:
3122
3123 sub mod { $_[0] = 1 }
3124 mod(2);
3125
3126Another way is to assign to a substr() that's off the end of the string.
3127
c5674021
PDF
3128Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
3129is aliased to a constant in the look I<LIST>:
3130
b7e4ecc1
FC
3131 $x = 1;
3132 foreach my $n ($x, 2) {
3133 $n *= 2; # modifies the $x, but fails on attempt to
3134 } # modify the 2
c5674021 3135
7a4340ed 3136=item Modification of non-creatable array value attempted, %s
a0d0e21e
LW
3137
3138(F) You tried to make an array value spring into existence, and the
3139subscript was probably negative, even counting from end of the array
3140backwards.
3141
7a4340ed 3142=item Modification of non-creatable hash value attempted, %s
a0d0e21e 3143
be771a83
GS
3144(P) You tried to make a hash value spring into existence, and it
3145couldn't be created for some peculiar reason.
a0d0e21e
LW
3146
3147=item Module name must be constant
3148
3149(F) Only a bare module name is allowed as the first argument to a "use".
3150
be98fb35 3151=item Module name required with -%c option
6df41af2 3152
be98fb35
GS
3153(F) The C<-M> or C<-m> options say that Perl should load some module, but
3154you omitted the name of the module. Consult L<perlrun> for full details
3155about C<-M> and C<-m>.
6df41af2 3156
fe13d51d 3157=item More than one argument to '%s' open
ed9aa3b7 3158
6903afa2 3159(F) The C<open> function has been asked to open multiple files. This
ed9aa3b7
SG
3160can happen if you are trying to open a pipe to a command that takes a
3161list of arguments, but have forgotten to specify a piped open mode.
3162See L<perlfunc/open> for details.
3163
85396b18
FC
3164=item mprotect for COW string %p %u failed with %d
3165
3166(S) You compiled perl with B<-D>PERL_DEBUG_READONLY_COW (see
3167L<perlguts/"Copy on Write">), but a shared string buffer
3168could not be made read-only.
3169
92951bce
FC
3170=item mprotect for %p %u failed with %d
3171
85396b18
FC
3172(S) You compiled perl with B<-D>PERL_DEBUG_READONLY_OPS (see L<perlhacktips>),
3173but an op tree could not be made read-only.
3174
3175=item mprotect RW for COW string %p %u failed with %d
3176
3177(S) You compiled perl with B<-D>PERL_DEBUG_READONLY_COW (see
3178L<perlguts/"Copy on Write">), but a read-only shared string
3179buffer could not be made mutable.
3180
92951bce
FC
3181=item mprotect RW for %p %u failed with %d
3182
3183(S) You compiled perl with B<-D>PERL_DEBUG_READONLY_OPS (see
85396b18
FC
3184L<perlhacktips>), but a read-only op tree could not be made
3185mutable before freeing the ops.
92951bce 3186
a0d0e21e
LW
3187=item msg%s not implemented
3188
3189(F) You don't have System V message IPC on your system.
3190
3191=item Multidimensional syntax %s not supported
3192
75b44862
GS
3193(W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>.
3194They're written like C<$foo[1][2][3]>, as in C.
8b1a09fc 3195
49704364 3196=item '/' must follow a numeric type in unpack
6df41af2 3197
49704364
WL
3198(F) You had an unpack template that contained a '/', but this did not
3199follow some unpack specification producing a numeric value.
3200See L<perlfunc/pack>.
6df41af2
GS
3201
3202=item "my sub" not yet implemented
3203
be771a83
GS
3204(F) Lexically scoped subroutines are not yet implemented. Don't try
3205that yet.
6df41af2 3206
5a25739d
FC
3207=item "my %s" used in sort comparison
3208
3209(W syntax) The package variables $a and $b are used for sort comparisons.
3210You used $a or $b in as an operand to the C<< <=> >> or C<cmp> operator inside a
3211sort comparison block, and the variable had earlier been declared as a
3212lexical variable. Either qualify the sort variable with the package
3213name, or rename the lexical variable.
3214
fd1b7234 3215=item "my" variable %s can't be in a package
6df41af2 3216
be771a83
GS
3217(F) Lexically scoped variables aren't in a package, so it doesn't make
3218sense to try to declare one with a package qualifier on the front. Use
3219local() if you want to localize a package variable.
09bef843 3220
8149aa9f
FC
3221=item Name "%s::%s" used only once: possible typo
3222
c59aba6c
FC
3223(W once) Typographical errors often show up as unique variable
3224names. If you had a good reason for having a unique name, then
3225just mention it again somehow to suppress the message. The C<our>
08a33b6b 3226declaration is also provided for this purpose.
c59aba6c 3227
08a33b6b
AP
3228NOTE: This warning detects package symbols that have been used only
3229once. This means lexical variables will never trigger this warning.
3230It also means that all of the package variables $c, @c, %c, as well
3231as *c, &c, sub c{}, c(), and c (the filehandle or
c59aba6c
FC
3232format) are considered the same; if a program uses $c only once
3233but also uses any of the others it will not trigger this warning.
3234Symbols beginning with an underscore and symbols using special
3235identifiers (q.v. L<perldata>) are exempt from this warning.
8149aa9f 3236
e0e4a6e3 3237=item Need exactly 3 octal digits in regex; marked by S<<-- HERE> in m/%s/
0d0b4b3b
KW
3238
3239(F) Within S<C<(?[ ])>>, all constants interpreted as octal need to be
3240exactly 3 digits long. This helps catch some ambiguities. If your
3241constant is too short, add leading zeros, like
3242
3243 (?[ [ \078 ] ]) # Syntax error!
3244 (?[ [ \0078 ] ]) # Works
3245 (?[ [ \007 8 ] ]) # Clearer
3246
3247The maximum number this construct can express is C<\777>. If you
675fa9ff
FC
3248need a larger one, you need to use L<\o{}|perlrebackslash/Octal escapes> instead. If you meant
3249two separate things, you need to separate them:
0d0b4b3b
KW
3250
3251 (?[ [ \7776 ] ]) # Syntax error!
3252 (?[ [ \o{7776} ] ]) # One meaning
3253 (?[ [ \777 6 ] ]) # Another meaning
3254 (?[ [ \777 \006 ] ]) # Still another
3255
49704364
WL
3256=item Negative '/' count in unpack
3257
3258(F) The length count obtained from a length/code unpack operation was
3259negative. See L<perlfunc/pack>.
3260
a0d0e21e
LW
3261=item Negative length
3262
be771a83
GS
3263(F) You tried to do a read/write/send/recv operation with a buffer
3264length that is less than 0. This is difficult to imagine.
a0d0e21e 3265
ed9aa3b7
SG
3266=item Negative offset to vec in lvalue context
3267
3268(F) When C<vec> is called in an lvalue context, the second argument must be
3269greater than or equal to zero.
3270
e0e4a6e3 3271=item Nested quantifiers in regex; marked by S<<-- HERE> in m/%s/
a0d0e21e 3272
6903afa2 3273(F) You can't quantify a quantifier without intervening parentheses.
e0e4a6e3 3274So things like ** or +* or ?* are illegal. The S<<-- HERE> shows
9e3ec65c 3275whereabouts in the regular expression the problem was discovered.
a0d0e21e 3276
7253e4e3 3277Note that the minimal matching quantifiers, C<*?>, C<+?>, and
be771a83 3278C<??> appear to be nested quantifiers, but aren't. See L<perlre>.
a0d0e21e 3279
6df41af2 3280=item %s never introduced
a0d0e21e 3281
be771a83
GS
3282(S internal) The symbol in question was declared but somehow went out of
3283scope before it could possibly have been used.
a0d0e21e 3284
2c7d6b9c
RGS
3285=item next::method/next::can/maybe::next::method cannot find enclosing method
3286
3287(F) C<next::method> needs to be called within the context of a
3288real method in a real package, and it could not find such a context.
3289See L<mro>.
3290
5a25739d 3291=item \N in a character class must be a named character: \N{...} in regex;
e0e4a6e3 3292marked by S<<-- HERE> in m/%s/
5a25739d 3293
32a77fbe
FC
3294(F) The new (as of Perl 5.12) meaning of C<\N> as C<[^\n]> is not valid in a
3295bracketed character class, for the same reason that C<.> in a character
3296class loses its specialness: it matches almost everything, which is
3297probably not what you want.
5a25739d 3298
0b4ce96d 3299=item \N{} in character class restricted to one character in regex; marked
e0e4a6e3 3300by S<<-- HERE> in m/%s/
0b4ce96d
FC
3301
3302(F) Named Unicode character escapes C<(\N{...})> may return a
3303multi-character sequence. Such an escape may not be used in
3304a character class, because character classes always match one
3305character of input. Check that the correct escape has been used,
e0e4a6e3 3306and the correct charname handler is in scope. The S<<-- HERE> shows
0b4ce96d
FC
3307whereabouts in the regular expression the problem was discovered.
3308
e0e4a6e3
FC
3309=item \N{NAME} must be resolved by the lexer in regex; marked by
3310S<<-- HERE> in m/%s/
5a25739d
FC
3311
3312(F) When compiling a regex pattern, an unresolved named character or
3313sequence was encountered. This can happen in any of several ways that
3314bypass the lexer, such as using single-quotish context, or an extra
3315backslash in double-quotish:
3316
3317 $re = '\N{SPACE}'; # Wrong!
3318 $re = "\\N{SPACE}"; # Wrong!
3319 /$re/;
3320
3321Instead, use double-quotes with a single backslash:
3322
3323 $re = "\N{SPACE}"; # ok
3324 /$re/;
3325
3326The lexer can be bypassed as well by creating the pattern from smaller
3327components:
3328
3329 $re = '\N';
3330 /${re}{SPACE}/; # Wrong!
3331
3332It's not a good idea to split a construct in the middle like this, and
3333it doesn't work here. Instead use the solution above.
3334
3335Finally, the message also can happen under the C</x> regex modifier when the
3336C<\N> is separated by spaces from the C<{>, in which case, remove the spaces.
3337
3338 /\N {SPACE}/x; # Wrong!
3339 /\N{SPACE}/x; # ok
3340
a0d0e21e
LW
3341=item No %s allowed while running setuid
3342
be771a83
GS
3343(F) Certain operations are deemed to be too insecure for a setuid or
3344setgid script to even be allowed to attempt. Generally speaking there
3345will be another way to do what you want that is, if not secure, at least
3346securable. See L<perlsec>.
a0d0e21e 3347
6651ba0b
FC
3348=item No code specified for -%c
3349
3350(F) Perl's B<-e> and B<-E> command-line options require an argument. If
3351you want to run an empty program, pass the empty string as a separate
3352argument or run a program consisting of a single 0 or 1:
3353
3354 perl -e ""
3355 perl -e0
3356 perl -e1
3357
a0d0e21e
LW
3358=item No comma allowed after %s
3359
6903afa2
FC
3360(F) A list operator that has a filehandle or "indirect object" is
3361not allowed to have a comma between that and the following arguments.
a0d0e21e
LW
3362Otherwise it'd be just another one of the arguments.
3363
6903afa2
FC
3364One possible cause for this is that you expected to have imported
3365a constant to your name space with B<use> or B<import> while no such
3366importing took place, it may for example be that your operating
3367system does not support that particular constant. Hopefully you did
3368use an explicit import list for the constants you expect to see;
3369please see L<perlfunc/use> and L<perlfunc/import>. While an
3370explicit import list would probably have caught this error earlier
3371it naturally does not remedy the fact that your operating system
3372still does not support that constant. Maybe you have a typo in
3373the constants of the symbol import list of B<use> or B<import> or in the
3374constant name at the line where this error was triggered?
0a753a76 3375
748a9306
LW
3376=item No command into which to pipe on command line
3377
be771a83
GS
3378(F) An error peculiar to VMS. Perl handles its own command line
3379redirection, and found a '|' at the end of the command line, so it
3380doesn't know where you want to pipe the output from this command.
748a9306 3381
a0d0e21e
LW
3382=item No DB::DB routine defined
3383
be771a83 3384(F) The currently executing code was compiled with the B<-d> switch, but
f7af5ce1 3385for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
ccafdc96
RGS
3386module) didn't define a routine to be called at the beginning of each
3387statement.
a0d0e21e
LW
3388
3389=item No dbm on this machine
3390
3391(P) This is counted as an internal error, because every machine should
5f05dabc 3392supply dbm nowadays, because Perl comes with SDBM. See L<SDBM_File>.
a0d0e21e 3393
ccafdc96 3394=item No DB::sub routine defined
a0d0e21e 3395
ccafdc96
RGS
3396(F) The currently executing code was compiled with the B<-d> switch, but
3397for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
3398module) didn't define a C<DB::sub> routine to be called at the beginning
3399of each ordinary subroutine call.
a0d0e21e 3400
6651ba0b
FC
3401=item No directory specified for -I
3402
3403(F) The B<-I> command-line switch requires a directory name as part of the
3404I<same> argument. Use B<-Ilib>, for instance. B<-I lib> won't work.
3405
c47ff5f1 3406=item No error file after 2> or 2>> on command line
748a9306 3407
be771a83
GS
3408(F) An error peculiar to VMS. Perl handles its own command line
3409redirection, and found a '2>' or a '2>>' on the command line, but can't
3410find the name of the file to which to write data destined for stderr.
748a9306 3411
49704364
WL
3412=item No group ending character '%c' found in template
3413
3414(F) A pack or unpack template has an opening '(' or '[' without its
6903afa2 3415matching counterpart. See L<perlfunc/pack>.
49704364 3416
c47ff5f1 3417=item No input file after < on command line
748a9306 3418
be771a83
GS
3419(F) An error peculiar to VMS. Perl handles its own command line
3420redirection, and found a '<' on the command line, but can't find the
3421name of the file from which to read data for stdin.
748a9306 3422
2c7d6b9c
RGS
3423=item No next::method '%s' found for %s
3424
3425(F) C<next::method> found no further instances of this method name
3426in the remaining packages of the MRO of this class. If you don't want
3427it throwing an exception, use C<maybe::next::method>
fa816bf3 3428or C<next::can>. See L<mro>.
2c7d6b9c 3429
e0e4a6e3 3430=item Non-hex character in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
3431
3432(F) In a regular expression, there was a non-hexadecimal character where
3433a hex one was expected, like
3434
3435 (?[ [ \xDG ] ])
3436 (?[ [ \x{DEKA} ] ])
3437
e0e4a6e3 3438=item Non-octal character in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
3439
3440(F) In a regular expression, there was a non-octal character where
3441an octal one was expected, like
3442
3443 (?[ [ \o{1278} ] ])
3444
3445=item Non-octal character '%c'. Resolved as "%s"
3446
3447(W digit) In parsing an octal numeric constant, a character was
3448unexpectedly encountered that isn't octal. The resulting value
3449is as indicated.
3450
6df41af2
GS
3451=item "no" not allowed in expression
3452
be771a83
GS
3453(F) The "no" keyword is recognized and executed at compile time, and
3454returns no useful value. See L<perlmod>.
6df41af2 3455
675fa9ff
FC
3456=item Non-string passed as bitmask
3457
3458(W misc) A number has been passed as a bitmask argument to select().
3459Use the vec() function to construct the file descriptor bitmasks for
3460select. See L<perlfunc/select>.
3461
c47ff5f1 3462=item No output file after > on command line
748a9306 3463
be771a83
GS
3464(F) An error peculiar to VMS. Perl handles its own command line
3465redirection, and found a lone '>' at the end of the command line, so it
3466doesn't know where you wanted to redirect stdout.
748a9306 3467
c47ff5f1 3468=item No output file after > or >> on command line
748a9306 3469
be771a83
GS
3470(F) An error peculiar to VMS. Perl handles its own command line
3471redirection, and found a '>' or a '>>' on the command line, but can't
3472find the name of the file to which to write data destined for stdout.
748a9306 3473
1ec3e8de
GS
3474=item No package name allowed for variable %s in "our"
3475
be771a83
GS
3476(F) Fully qualified variable names are not allowed in "our"
3477declarations, because that doesn't make much sense under existing
3478semantics. Such syntax is reserved for future extensions.
1ec3e8de 3479
a0d0e21e
LW
3480=item No Perl script found in input
3481
3482(F) You called C<perl -x>, but no line was found in the file beginning
3483with #! and containing the word "perl".
3484
3485=item No setregid available
3486
3487(F) Configure didn't find anything resembling the setregid() call for
3488your system.
3489
3490=item No setreuid available
3491
3492(F) Configure didn't find anything resembling the setreuid() call for
3493your system.
3494
5a25739d
FC
3495=item No such class %s
3496
3497(F) You provided a class qualifier in a "my", "our" or "state"
3498declaration, but this class doesn't exist at this point in your program.
3499
e75d1f10
RD
3500=item No such class field "%s" in variable %s of type %s
3501
b7e4ecc1
FC
3502(F) You tried to access a key from a hash through the indicated typed
3503variable but that key is not allowed by the package of the same type.
3504The indicated package has restricted the set of allowed keys using the
3505L<fields> pragma.
e75d1f10 3506
3c20a832
SP
3507=item No such hook: %s
3508
dc7e5945
FC
3509(F) You specified a signal hook that was not recognized by Perl.
3510Currently, Perl accepts C<__DIE__> and C<__WARN__> as valid signal hooks.
3c20a832 3511
6df41af2
GS
3512=item No such pipe open
3513
3514(P) An error peculiar to VMS. The internal routine my_pclose() tried to
be771a83
GS
3515close a pipe which hadn't been opened. This should have been caught
3516earlier as an attempt to close an unopened filehandle.
6df41af2 3517
a0d0e21e
LW
3518=item No such signal: SIG%s
3519
be771a83
GS
3520(W signal) You specified a signal name as a subscript to %SIG that was
3521not recognized. Say C<kill -l> in your shell to see the valid signal
3522names on your system.
a0d0e21e
LW
3523
3524=item Not a CODE reference
3525
3526(F) Perl was trying to evaluate a reference to a code value (that is, a
3527subroutine), but found a reference to something else instead. You can
be771a83
GS
3528use the ref() function to find out what kind of ref it really was. See
3529also L<perlref>.
a0d0e21e 3530
a0d0e21e
LW
3531=item Not a GLOB reference
3532
be771a83
GS
3533(F) Perl was trying to evaluate a reference to a "typeglob" (that is, a
3534symbol table entry that looks like C<*foo>), but found a reference to
3535something else instead. You can use the ref() function to find out what
3536kind of ref it really was. See L<perlref>.
a0d0e21e
LW
3537
3538=item Not a HASH reference
3539
be771a83
GS
3540(F) Perl was trying to evaluate a reference to a hash value, but found a
3541reference to something else instead. You can use the ref() function to
3542find out what kind of ref it really was. See L<perlref>.
a0d0e21e 3543
6df41af2
GS
3544=item Not an ARRAY reference
3545
be771a83
GS
3546(F) Perl was trying to evaluate a reference to an array value, but found
3547a reference to something else instead. You can use the ref() function
3548to find out what kind of ref it really was. See L<perlref>.
6df41af2 3549
d4fc4415
FC
3550=item Not an unblessed ARRAY reference
3551
3552(F) You passed a reference to a blessed array to C<push>, C<shift> or
3553another array function. These only accept unblessed array references
3554or arrays beginning explicitly with C<@>.
3555
a0d0e21e
LW
3556=item Not a SCALAR reference
3557
be771a83
GS
3558(F) Perl was trying to evaluate a reference to a scalar value, but found
3559a reference to something else instead. You can use the ref() function
3560to find out what kind of ref it really was. See L<perlref>.
a0d0e21e
LW
3561
3562=item Not a subroutine reference
3563
3564(F) Perl was trying to evaluate a reference to a code value (that is, a
3565subroutine), but found a reference to something else instead. You can
be771a83
GS
3566use the ref() function to find out what kind of ref it really was. See
3567also L<perlref>.
a0d0e21e 3568
e7ea3e70 3569=item Not a subroutine reference in overload table
a0d0e21e
LW
3570
3571(F) An attempt was made to specify an entry in an overloading table that
8b1a09fc 3572doesn't somehow point to a valid subroutine. See L<overload>.
a0d0e21e 3573
a0d0e21e
LW
3574=item Not enough arguments for %s
3575
3576(F) The function requires more arguments than you specified.
3577
6df41af2
GS
3578=item Not enough format arguments
3579
be771a83
GS
3580(W syntax) A format specified more picture fields than the next line
3581supplied. See L<perlform>.
6df41af2
GS
3582
3583=item %s: not found
3584
be771a83
GS
3585(A) You've accidentally run your script through the Bourne shell instead
3586of Perl. Check the #! line, or manually feed your script into Perl
3587yourself.
6df41af2 3588
e0e4a6e3 3589=item (?[...]) not valid in locale in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
3590
3591(F) C<(?[...])> cannot be used within the scope of a C<S<use locale>> or with
3592an C</l> regular expression modifier, as that would require deferring
3593to run-time the calculation of what it should evaluate to, and it is
3594regex compile-time only.
3595
6df41af2 3596=item no UTC offset information; assuming local time is UTC
a0d0e21e 3597
6df41af2
GS
3598(S) A warning peculiar to VMS. Perl was unable to find the local
3599timezone offset, so it's assuming that local system time is equivalent
be771a83
GS
3600to UTC. If it's not, define the logical name
3601F<SYS$TIMEZONE_DIFFERENTIAL> to translate to the number of seconds which
3602need to be added to UTC to get local time.
a0d0e21e
LW
3603
3604=item Null filename used
3605
be771a83
GS
3606(F) You can't require the null filename, especially because on many
3607machines that means the current directory! See L<perlfunc/require>.
a0d0e21e 3608
6df41af2
GS
3609=item NULL OP IN RUN
3610
f84fe999 3611(S debugging) Some internal routine called run() with a null opcode
be771a83 3612pointer.
6df41af2 3613
55497cff 3614=item Null picture in formline
3615
3616(F) The first argument to formline must be a valid format picture
3617specification. It was found to be empty, which probably means you
3618supplied it an uninitialized value. See L<perlform>.
3619
a0d0e21e
LW
3620=item Null realloc
3621
3622(P) An attempt was made to realloc NULL.
3623
3624=item NULL regexp argument
3625
5f05dabc 3626(P) The internal pattern matching routines blew it big time.
a0d0e21e
LW
3627
3628=item NULL regexp parameter
3629
3630(P) The internal pattern matching routines are out of their gourd.
3631
fc36a67e 3632=item Number too long
3633
be771a83 3634(F) Perl limits the representation of decimal numbers in programs to
da75cd15 3635about 250 characters. You've exceeded that length. Future
be771a83
GS
3636versions of Perl are likely to eliminate this arbitrary limitation. In
3637the meantime, try using scientific notation (e.g. "1e6" instead of
3638"1_000_000").
fc36a67e 3639
f0a2b745
KW
3640=item Number with no digits
3641
1043934d 3642(F) Perl was looking for a number but found nothing that looked like
6903afa2 3643a number. This happens, for example with C<\o{}>, with no number between
1043934d 3644the braces.
f0a2b745 3645
252aa082
JH
3646=item Octal number > 037777777777 non-portable
3647
75b44862 3648(W portable) The octal number you specified is larger than 2**32-1
be771a83
GS
3649(4294967295) and therefore non-portable between systems. See
3650L<perlport> for more on portability concerns.
252aa082 3651
30d9c59b
Z
3652=item Odd name/value argument for subroutine
3653
3654(F) A subroutine using a slurpy hash parameter in its signature
3655received an odd number of arguments to populate the hash. It requires
3656the arguments to be paired, with the same number of keys as values.
3657The caller of the subroutine is presumably at fault. Inconveniently,
3658this error will be reported at the location of the subroutine, not that
3659of the caller.
3660
6ad11d81
JH
3661=item Odd number of arguments for overload::constant
3662
04a80ee0 3663(W overload) The call to overload::constant contained an odd number of
6903afa2 3664arguments. The arguments should come in pairs.
6ad11d81 3665
b21befc1
MG
3666=item Odd number of elements in anonymous hash
3667
3668(W misc) You specified an odd number of elements to initialize a hash,
3669which is odd, because hashes come in key/value pairs.
3670
1930e939 3671=item Odd number of elements in hash assignment
a0d0e21e 3672
be771a83
GS
3673(W misc) You specified an odd number of elements to initialize a hash,
3674which is odd, because hashes come in key/value pairs.
a0d0e21e 3675
bbce6d69 3676=item Offset outside string
3677
1fa582fa 3678(F)(W layer) You tried to do a read/write/send/recv/seek operation
42bc49da 3679with an offset pointing outside the buffer. This is difficult to
f5a7294f
JH
3680imagine. The sole exceptions to this are that zero padding will
3681take place when going past the end of the string when either
3682C<sysread()>ing a file, or when seeking past the end of a scalar opened
1a7a2554
MB
3683for I/O (in anticipation of future reads and to imitate the behaviour
3684with real files).
bbce6d69 3685
c289d2f7 3686=item %s() on unopened %s
2dd78f96
JH
3687
3688(W unopened) An I/O operation was attempted on a filehandle that was
3689never initialized. You need to do an open(), a sysopen(), or a socket()
3690call, or call a constructor from the FileHandle package.
3691
96ebfdd7
RK
3692=item -%s on unopened filehandle %s
3693
3694(W unopened) You tried to invoke a file test operator on a filehandle
3695that isn't open. Check your control flow. See also L<perlfunc/-X>.
3696
a0d0e21e
LW
3697=item oops: oopsAV
3698
e476b1b5 3699(S internal) An internal warning that the grammar is screwed up.
a0d0e21e
LW
3700
3701=item oops: oopsHV
3702
e476b1b5 3703(S internal) An internal warning that the grammar is screwed up.
a0d0e21e 3704
abc718f2
RGS
3705=item Opening dirhandle %s also as a file
3706
713e2616 3707(D io, deprecated) You used open() to associate a filehandle to
abc718f2
RGS
3708a symbol (glob or scalar) that already holds a dirhandle.
3709Although legal, this idiom might render your code confusing
3710and is deprecated.
3711
3712=item Opening filehandle %s also as a directory
3713
28038637 3714(D io, deprecated) You used opendir() to associate a dirhandle to
abc718f2
RGS
3715a symbol (glob or scalar) that already holds a filehandle.
3716Although legal, this idiom might render your code confusing
3717and is deprecated.
3718
e0e4a6e3
FC
3719=item Operand with no preceding operator in regex; marked by S<<-- HERE> in
3720m/%s/
0d0b4b3b 3721
675fa9ff 3722(F) You wrote something like
0d0b4b3b
KW
3723
3724 (?[ \p{Digit} \p{Thai} ])
3725
3726There are two operands, but no operator giving how you want to combine
3727them.
3728
a0288114 3729=item Operation "%s": no method found, %s
44a8e56a 3730
be771a83
GS
3731(F) An attempt was made to perform an overloaded operation for which no
3732handler was defined. While some handlers can be autogenerated in terms
3733of other handlers, there is no default handler for any operation, unless
e4aad80d 3734the C<fallback> overloading key is specified to be true. See L<overload>.
44a8e56a 3735
5ff1373f 3736=item Operation "%s" returns its argument for non-Unicode code point 0x%X
9ae3ac1a 3737
b5af3ad2
FC
3738(S non_unicode) You performed an operation requiring Unicode semantics
3739on a code point that is not in Unicode, so what it should do is not
3740defined. Perl has chosen to have it do nothing, and warn you.
9ae3ac1a
KW
3741
3742If the operation shown is "ToFold", it means that case-insensitive
3743matching in a regular expression was done on the code point.
3744
3745If you know what you are doing you can turn off this warning by
8457b38f 3746C<no warnings 'non_unicode';>.
9ae3ac1a 3747
5ff1373f 3748=item Operation "%s" returns its argument for UTF-16 surrogate U+%X
9ae3ac1a 3749
4c2e59a0 3750(S surrogate) You performed an operation requiring Unicode
ad94bb39
FC
3751semantics on a Unicode surrogate. Unicode frowns upon the use
3752of surrogates for anything but storing strings in UTF-16, but
3753semantics are (reluctantly) defined for the surrogates, and
3754they are to do nothing for this operation. Because the use of
3755surrogates can be dangerous, Perl warns.
9ae3ac1a
KW
3756
3757If the operation shown is "ToFold", it means that case-insensitive
3758matching in a regular expression was done on the code point.
3759
3760If you know what you are doing you can turn off this warning by
8457b38f 3761C<no warnings 'surrogate';>.
9ae3ac1a 3762
748a9306
LW
3763=item Operator or semicolon missing before %s
3764
be771a83
GS
3765(S ambiguous) You used a variable or subroutine call where the parser
3766was expecting an operator. The parser has assumed you really meant to
3767use an operator, but this is highly likely to be incorrect. For
3768example, if you say "*foo *foo" it will be interpreted as if you said
3769"*foo * 'foo'".
748a9306 3770
30d9c59b
Z
3771=item Optional parameter lacks default expression
3772
3773(F) In a subroutine signature, you wrote something like "$a =", making a
3774named optional parameter without a default value. A nameless optional
3775parameter is permitted to have no default value, but a named one must
3776have a specific default. You probably want "$a = undef".
3777
6df41af2
GS
3778=item "our" variable %s redeclared
3779
be771a83
GS
3780(W misc) You seem to have already declared the same global once before
3781in the current lexical scope.
6df41af2 3782
a80b8354
GS
3783=item Out of memory!
3784
3785(X) The malloc() function returned 0, indicating there was insufficient
be771a83
GS
3786remaining memory (or virtual memory) to satisfy the request. Perl has
3787no option but to exit immediately.
a80b8354 3788
19a52907
JH
3789At least in Unix you may be able to get past this by increasing your
3790process datasize limits: in csh/tcsh use C<limit> and
3791C<limit datasize n> (where C<n> is the number of kilobytes) to check
3792the current limits and change them, and in ksh/bash/zsh use C<ulimit -a>
3793and C<ulimit -d n>, respectively.
3794
6d3b25aa
RGS
3795=item Out of memory during %s extend
3796
3797(X) An attempt was made to extend an array, a list, or a string beyond
3798the largest possible memory allocation.
3799
6df41af2 3800=item Out of memory during "large" request for %s
a0d0e21e 3801
6df41af2 3802(F) The malloc() function returned 0, indicating there was insufficient
6903afa2 3803remaining memory (or virtual memory) to satisfy the request. However,
be771a83
GS
3804the request was judged large enough (compile-time default is 64K), so a
3805possibility to shut down by trapping this error is granted.
a0d0e21e 3806
1b979e0a 3807=item Out of memory during request for %s
a0d0e21e 3808
1fa582fa 3809(X)(F) The malloc() function returned 0, indicating there was
be771a83
GS
3810insufficient remaining memory (or virtual memory) to satisfy the
3811request.
eff9c6e2
CS
3812
3813The request was judged to be small, so the possibility to trap it
3814depends on the way perl was compiled. By default it is not trappable.
be771a83
GS
3815However, if compiled for this, Perl may use the contents of C<$^M> as an
3816emergency pool after die()ing with this message. In this case the error
b022d2d2
IZ
3817is trappable I<once>, and the error message will include the line and file
3818where the failed request happened.
55497cff 3819
1b979e0a
IZ
3820=item Out of memory during ridiculously large request
3821
3822(F) You can't allocate more than 2^31+"small amount" bytes. This error
be771a83
GS
3823is most likely to be caused by a typo in the Perl program. e.g.,
3824C<$arr[time]> instead of C<$arr[$time]>.
1b979e0a 3825
6df41af2
GS
3826=item Out of memory for yacc stack
3827
be771a83
GS
3828(F) The yacc parser wanted to grow its stack so it could continue
3829parsing, but realloc() wouldn't give it more memory, virtual or
3830otherwise.
6df41af2 3831
28be1210
TH
3832=item '.' outside of string in pack
3833
3834(F) The argument to a '.' in your template tried to move the working
3835position to before the start of the packed string being built.
3836
49704364 3837=item '@' outside of string in unpack
6df41af2 3838
49704364 3839(F) You had a template that specified an absolute position outside
6df41af2
GS
3840the string being unpacked. See L<perlfunc/pack>.
3841
f337b084
TH
3842=item '@' outside of string with malformed UTF-8 in unpack
3843
3844(F) You had a template that specified an absolute position outside
6903afa2 3845the string being unpacked. The string being unpacked was also invalid
fa816bf3 3846UTF-8. See L<perlfunc/pack>.
f337b084 3847
7778d804
FC
3848=item overload arg '%s' is invalid
3849
3850(W overload) The L<overload> pragma was passed an argument it did not
3851recognize. Did you mistype an operator?
3852
7cb0cfe6
BM
3853=item Overloaded dereference did not return a reference
3854
3855(F) An object with an overloaded dereference operator was dereferenced,
6903afa2 3856but the overloaded operation did not return a reference. See
7cb0cfe6
BM
3857L<overload>.
3858
3859=item Overloaded qr did not return a REGEXP
3860
3861(F) An object with a C<qr> overload was used as part of a match, but the
6903afa2 3862overloaded operation didn't return a compiled regexp. See L<overload>.
7cb0cfe6 3863
6df41af2
GS
3864=item %s package attribute may clash with future reserved word: %s
3865
be771a83
GS
3866(W reserved) A lowercase attribute name was used that had a
3867package-specific handler. That name might have a meaning to Perl itself
3868some day, even though it doesn't yet. Perhaps you should use a
3869mixed-case attribute name, instead. See L<attributes>.
6df41af2 3870
96ebfdd7
RK
3871=item pack/unpack repeat count overflow
3872
3873(F) You can't specify a repeat count so large that it overflows your
3874signed integers. See L<perlfunc/pack>.
3875
a0d0e21e
LW
3876=item page overflow
3877
be771a83
GS
3878(W io) A single call to write() produced more lines than can fit on a
3879page. See L<perlform>.
a0d0e21e 3880
6df41af2
GS
3881=item panic: %s
3882
3883(P) An internal error.
3884
c99a1475
NC
3885=item panic: attempt to call %s in %s
3886
3887(P) One of the file test operators entered a code branch that calls
3888an ACL related-function, but that function is not available on this
3889platform. Earlier checks mean that it should not be possible to
3890enter this branch on this platform.
3891
d5e473ac
SH
3892=item panic: child pseudo-process was never scheduled
3893
3894(P) A child pseudo-process in the ithreads implementation on Windows
3895was not scheduled within the time period allowed and therefore was not
3896able to initialize properly.
3897
5637ef5b 3898=item panic: ck_grep, type=%u
a0d0e21e
LW
3899
3900(P) Failed an internal consistency check trying to compile a grep.
3901
5637ef5b 3902=item panic: ck_split, type=%u
a0d0e21e
LW
3903
3904(P) Failed an internal consistency check trying to compile a split.
3905
5637ef5b 3906=item panic: corrupt saved stack index %ld
a0d0e21e 3907
be771a83
GS
3908(P) The savestack was requested to restore more localized values than
3909there are in the savestack.
a0d0e21e 3910
810b8aa5
GS
3911=item panic: del_backref
3912
3913(P) Failed an internal consistency check while trying to reset a weak
3914reference.
3915
a0d0e21e
LW
3916=item panic: die %s
3917
3918(P) We popped the context stack to an eval context, and then discovered
3919it wasn't an eval context.
3920
a0d0e21e
LW
3921=item panic: do_subst
3922
be771a83
GS
3923(P) The internal pp_subst() routine was called with invalid operational
3924data.
a0d0e21e 3925
2269b42e 3926=item panic: do_trans_%s
a0d0e21e 3927
2269b42e 3928(P) The internal do_trans routines were called with invalid operational
be771a83 3929data.
a0d0e21e 3930
b7f7fd0b
NC
3931=item panic: fold_constants JMPENV_PUSH returned %d
3932
10203f38 3933(P) While attempting folding constants an exception other than an C<eval>
b7f7fd0b
NC
3934failure was caught.
3935
c635e13b 3936=item panic: frexp
3937
3938(P) The library function frexp() failed, making printf("%f") impossible.
3939
5637ef5b 3940=item panic: goto, type=%u, ix=%ld
a0d0e21e
LW
3941
3942(P) We popped the context stack to a context with the specified label,
3943and then discovered it wasn't a context we know how to do a goto in.
3944
b0d55c99
FC
3945=item panic: gp_free failed to free glob pointer
3946
3947(P) The internal routine used to clear a typeglob's entries tried
6903afa2
FC
3948repeatedly, but each time something re-created entries in the glob.
3949Most likely the glob contains an object with a reference back to
3950the glob and a destructor that adds a new object to the glob.
b0d55c99 3951
5637ef5b 3952=item panic: INTERPCASEMOD, %s
a0d0e21e
LW
3953
3954(P) The lexer got into a bad state at a case modifier.
3955
5637ef5b 3956=item panic: INTERPCONCAT, %s
a0d0e21e
LW
3957
3958(P) The lexer got into a bad state parsing a string with brackets.
3959
e446cec8
IZ
3960=item panic: kid popen errno read
3961
1f91b9f5 3962(F) A forked child returned an incomprehensible message about its errno.
e446cec8 3963
5637ef5b 3964=item panic: last, type=%u
a0d0e21e
LW
3965
3966(P) We popped the context stack to a block context, and then discovered
3967it wasn't a block context.
3968
3969=item panic: leave_scope clearsv
3970
be771a83
GS
3971(P) A writable lexical variable became read-only somehow within the
3972scope.
a0d0e21e 3973
5637ef5b 3974=item panic: leave_scope inconsistency %u
a0d0e21e
LW
3975
3976(P) The savestack probably got out of sync. At least, there was an
3977invalid enum on the top of it.
3978
810b8aa5
GS
3979=item panic: magic_killbackrefs
3980
3981(P) Failed an internal consistency check while trying to reset all weak
3982references to an object.
3983
5637ef5b 3984=item panic: malloc, %s
6df41af2
GS
3985
3986(P) Something requested a negative number of bytes of malloc.
3987
27d5b266
JH
3988=item panic: memory wrap
3989
46f9c2c2
FC
3990(P) Something tried to allocate either more memory than possible or a
3991negative amount.
27d5b266 3992
5637ef5b 3993=item panic: pad_alloc, %p!=%p
a0d0e21e
LW
3994
3995(P) The compiler got confused about which scratch pad it was allocating
3996and freeing temporaries and lexicals from.
3997
5637ef5b 3998=item panic: pad_free curpad, %p!=%p
a0d0e21e
LW
3999
4000(P) The compiler got confused about which scratch pad it was allocating
4001and freeing temporaries and lexicals from.
4002
4003=item panic: pad_free po
4004
4005(P) An invalid scratch pad offset was detected internally.
4006
5637ef5b 4007=item panic: pad_reset curpad, %p!=%p
a0d0e21e
LW
4008
4009(P) The compiler got confused about which scratch pad it was allocating
4010and freeing temporaries and lexicals from.
4011
4012=item panic: pad_sv po
4013
4014(P) An invalid scratch pad offset was detected internally.
4015
5637ef5b 4016=item panic: pad_swipe curpad, %p!=%p
a0d0e21e
LW
4017
4018(P) The compiler got confused about which scratch pad it was allocating
4019and freeing temporaries and lexicals from.
4020
4021=item panic: pad_swipe po
4022
4023(P) An invalid scratch pad offset was detected internally.
4024
5637ef5b 4025=item panic: pp_iter, type=%u
a0d0e21e
LW
4026
4027(P) The foreach iterator got called in a non-loop context frame.
4028
96ebfdd7
RK
4029=item panic: pp_match%s
4030
4031(P) The internal pp_match() routine was called with invalid operational
4032data.
4033
5637ef5b 4034=item panic: pp_split, pm=%p, s=%p
2269b42e
JH
4035
4036(P) Something terrible went wrong in setting up for the split.
4037
5637ef5b 4038=item panic: realloc, %s
a0d0e21e
LW
4039
4040(P) Something requested a negative number of bytes of realloc.
4041
ccfb6d2e
FC
4042=item panic: reference miscount on nsv in sv_replace() (%d != 1)
4043
4044(P) The internal sv_replace() function was handed a new SV with a
4045reference count other than 1.
4046
5637ef5b 4047=item panic: restartop in %s
a0d0e21e
LW
4048
4049(P) Some internal routine requested a goto (or something like it), and
4050didn't supply the destination.
4051
5637ef5b 4052=item panic: return, type=%u
a0d0e21e
LW
4053
4054(P) We popped the context stack to a subroutine or eval context, and
4055then discovered it wasn't a subroutine or eval context.
4056
5637ef5b 4057=item panic: scan_num, %s
a0d0e21e
LW
4058
4059(P) scan_num() got called on something that wasn't a number.
4060
4599db5f 4061=item panic: Sequence (?{...}): no code block found in regex m/%s/
d24ca0c5 4062
1f91b9f5 4063(P) While compiling a pattern that has embedded (?{}) or (??{}) code
d24ca0c5
DM
4064blocks, perl couldn't locate the code block that should have already been
4065seen and compiled by perl before control passed to the regex compiler.
4066
5a25739d
FC
4067=item panic: strxfrm() gets absurd - a => %u, ab => %u
4068
4069(P) The interpreter's sanity check of the C function strxfrm() failed.
4070In your current locale the returned transformation of the string "ab"
4071is shorter than that of the string "a", which makes no sense.
4072
6c65d5f9
NC
4073=item panic: sv_chop %s
4074
4075(P) The sv_chop() routine was passed a position that is not within the
4076scalar's string buffer.
4077
5637ef5b 4078=item panic: sv_insert, midend=%p, bigend=%p
a0d0e21e
LW
4079
4080(P) The sv_insert() routine was told to remove more string than there
4081was string.
4082
4083=item panic: top_env
4084
6224f72b 4085(P) The compiler attempted to do a goto, or something weird like that.
a0d0e21e 4086
65bca31a
NC
4087=item panic: unimplemented op %s (#%d) called
4088
a1efa96e
FC
4089(P) The compiler is screwed up and attempted to use an op that isn't
4090permitted at run time.
65bca31a 4091
dea0fc0b
JH
4092=item panic: utf16_to_utf8: odd bytelen
4093
4094(P) Something tried to call utf16_to_utf8 with an odd (as opposed
64977eb6 4095to even) byte length.
dea0fc0b 4096
e0ea5e2d
NC
4097=item panic: utf16_to_utf8_reversed: odd bytelen
4098
4099(P) Something tried to call utf16_to_utf8_reversed with an odd (as opposed
4100to even) byte length.
4101
5637ef5b 4102=item panic: yylex, %s
2f7da168
RK
4103
4104(P) The lexer got into a bad state while processing a case modifier.
4105
78181aa9
KW
4106=item Parentheses missing around "%s" list
4107
4108(W parenthesis) You said something like
4109
4110 my $foo, $bar = @_;
4111
4112when you meant
4113
4114 my ($foo, $bar) = @_;
4115
4116Remember that "my", "our", "local" and "state" bind tighter than comma.
4117
28ac2b49
Z
4118=item Parsing code internal error (%s)
4119
4120(F) Parsing code supplied by an extension violated the parser's API in
4121a detectable way.
4122
9816f121
KW
4123=item Passing malformed UTF-8 to "%s" is deprecated
4124
4125(D deprecated, utf8) This message indicates a bug either in the Perl
4126core or in XS code. Such code was trying to find out if a character,
4127allegedly stored internally encoded as UTF-8, was of a given type, such
4128as being punctuation or a digit. But the character was not encoded in
4129legal UTF-8. The C<%s> is replaced by a string that can be used by
4130knowledgeable people to determine what the type being checked against
4131was. If C<utf8> warnings are enabled, a further message is raised,
4132giving details of the malformation.
4133
b9bd8d8c 4134=item Pattern subroutine nesting without pos change exceeded limit in regex
1a147d38
YO
4135
4136(F) You used a pattern that uses too many nested subpattern calls without
6903afa2
FC
4137consuming any text. Restructure the pattern so text is consumed before
4138the nesting limit is exceeded.
1a147d38 4139
96ebfdd7
RK
4140=item C<-p> destination: %s
4141
4142(F) An error occurred during the implicit output invoked by the C<-p>
4143command-line switch. (This output goes to STDOUT unless you've
4144redirected it with select().)
4145
4146=item (perhaps you forgot to load "%s"?)
4147
4148(F) This is an educated guess made in conjunction with the message
4149"Can't locate object method \"%s\" via package \"%s\"". It often means
4150that a method requires a package that has not been loaded.
4151
b33c0c71 4152=item Perl folding rules are not up-to-date for 0x%X; please use the perlbug
e0e4a6e3 4153utility to report; in regex; marked by S<<-- HERE> in m/%s/
d50a4f90 4154
6014bd26
JK
4155(S regexp) You used a regular expression with case-insensitive matching,
4156and there is a bug in Perl in which the built-in regular expression
4157folding rules are not accurate. This may lead to incorrect results.
4158Please report this as a bug using the L<perlbug> utility.
d50a4f90 4159
1109a392
MHM
4160=item Perl_my_%s() not available
4161
4162(F) Your platform has very uncommon byte-order and integer size,
4163so it was not possible to set up some or all fixed-width byte-order
4164conversion functions. This is only a problem when you're using the
4165'<' or '>' modifiers in (un)pack templates. See L<perlfunc/pack>.
4166
6651ba0b
FC
4167=item Perl %s required (did you mean %s?)--this is only %s, stopped
4168
4169(F) The code you are trying to run has asked for a newer version of
4170Perl than you are running. Perhaps C<use 5.10> was written instead
4171of C<use 5.010> or C<use v5.10>. Without the leading C<v>, the number is
4172interpreted as a decimal, with every three digits after the
4173decimal point representing a part of the version number. So 5.10
4174is equivalent to v5.100.
4175
6903f24f 4176=item Perl %s required--this is only %s, stopped
6d3b25aa
RGS
4177
4178(F) The module in question uses features of a version of Perl more
4179recent than the currently running version. How long has it been since
4180you upgraded, anyway? See L<perlfunc/require>.
4181
6df41af2
GS
4182=item PERL_SH_DIR too long
4183
fa816bf3 4184(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
fecfaeb8 4185C<sh>-shell in. See "PERL_SH_DIR" in L<perlos2>.
6df41af2 4186
96ebfdd7
RK
4187=item PERL_SIGNALS illegal: "%s"
4188
806b6d07 4189(X) See L<perlrun/PERL_SIGNALS> for legal values.
96ebfdd7 4190
6651ba0b
FC
4191=item Perls since %s too modern--this is %s, stopped
4192
4193(F) The code you are trying to run claims it will not run
4194on the version of Perl you are using because it is too new.
4195Maybe the code needs to be updated, or maybe it is simply
4196wrong and the version check should just be removed.
4197
675fa9ff
FC
4198=item perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set
4199
ff9c1ae8 4200(S) PERL_HASH_SEED should match /^\s*(?:0x)?[0-9a-fA-F]+\s*\z/ but it
675fa9ff
FC
4201contained a non hex character. This could mean you are not using the
4202hash seed you think you are.
6a5b4183 4203
6df41af2
GS
4204=item perl: warning: Setting locale failed.
4205
4206(S) The whole warning message will look something like:
4207
4208 perl: warning: Setting locale failed.
4209 perl: warning: Please check that your locale settings:
4210 LC_ALL = "En_US",
4211 LANG = (unset)
4212 are supported and installed on your system.
4213 perl: warning: Falling back to the standard locale ("C").
4214
4215Exactly what were the failed locale settings varies. In the above the
4216settings were that the LC_ALL was "En_US" and the LANG had no value.
0ea6b70f
JH
4217This error means that Perl detected that you and/or your operating
4218system supplier and/or system administrator have set up the so-called
4219locale system but Perl could not use those settings. This was not
4220dead serious, fortunately: there is a "default locale" called "C" that
4b07a369
FC
4221Perl can and will use, and the script will be run. Before you really
4222fix the problem, however, you will get the same error message each
4223time you run Perl. How to really fix the problem can be found in
0ea6b70f 4224L<perllocale> section B<LOCALE PROBLEMS>.
6df41af2 4225
6a5b4183
YO
4226=item perl: warning: strange setting in '$ENV{PERL_PERTURB_KEYS}': '%s'
4227
ff9c1ae8 4228(S) Perl was run with the environment variable PERL_PERTURB_KEYS defined
675fa9ff 4229but containing an unexpected value. The legal values of this setting
6a5b4183
YO
4230are as follows.
4231
4232 Numeric | String | Result
4233 --------+---------------+-----------------------------------------
4234 0 | NO | Disables key traversal randomization
4235 1 | RANDOM | Enables full key traversal randomization
555bd962
BG
4236 2 | DETERMINISTIC | Enables repeatable key traversal
4237 | | randomization
6a5b4183
YO
4238
4239Both numeric and string values are accepted, but note that string values are
675fa9ff 4240case sensitive. The default for this setting is "RANDOM" or 1.
aac486f1 4241
bd3fa61c 4242=item pid %x not a child
748a9306 4243
be771a83
GS
4244(W exec) A warning peculiar to VMS. Waitpid() was asked to wait for a
4245process which isn't a subprocess of the current process. While this is
4246fine from VMS' perspective, it's probably not what you intended.
748a9306 4247
49704364 4248=item 'P' must have an explicit size in unpack
3bf38418
WL
4249
4250(F) The unpack format P must have an explicit size, not "*".
4251
0953b66b
FC
4252=item pop on reference is experimental
4253
0773cb3e
FC
4254(S experimental::autoderef) C<pop> with a scalar argument is experimental
4255and may change or be removed in a future Perl version. If you want to
4256take the risk of using this feature, simply disable this warning:
0953b66b 4257
d401967c 4258 no warnings "experimental::autoderef";
0953b66b
FC
4259
4260=item POSIX class [:%s:] unknown in regex; marked by S<< <-- HERE in m/%s/ >>
96ebfdd7 4261
e0e4a6e3 4262(F) The class in the character class [: :] syntax is unknown. The S<<-- HERE>
9e3ec65c 4263shows whereabouts in the regular expression the problem was discovered.
96ebfdd7
RK
4264Note that the POSIX character classes do B<not> have the C<is> prefix
4265the corresponding C interfaces have: in other words, it's C<[[:print:]]>,
4266not C<isprint>. See L<perlre>.
4267
4268=item POSIX getpgrp can't take an argument
4269
4270(F) Your system has POSIX getpgrp(), which takes no argument, unlike
4271the BSD version, which takes a pid.
4272
b33c0c71 4273=item POSIX syntax [%c %c] belongs inside character classes in regex; marked by
e0e4a6e3 4274S<<-- HERE> in m/%s/
b45f050a 4275
9a0b3859 4276(W regexp) The character class constructs [: :], [= =], and [. .] go
7253e4e3
RK
4277I<inside> character classes, the [] are part of the construct, for example:
4278/[012[:alpha:]345]/. Note that [= =] and [. .] are not currently
9e3ec65c 4279implemented; they are simply placeholders for future extensions and
e0e4a6e3 4280will cause fatal errors. The S<<-- HERE> shows whereabouts in the regular
9e3ec65c 4281expression the problem was discovered. See L<perlre>.
b45f050a 4282
6fbc9859 4283=item POSIX syntax [. .] is reserved for future extensions in regex; marked by
e0e4a6e3 4284S<<-- HERE> in m/%s/
b45f050a 4285
a125938c
FC
4286(F) Within regular expression character classes ([]) the syntax beginning
4287with "[." and ending with ".]" is reserved for future extensions. If you
4288need to represent those character sequences inside a regular expression
4289character class, just quote the square brackets with the backslash: "\[."
e0e4a6e3 4290and ".\]". The S<<-- HERE> shows whereabouts in the regular expression the
a125938c 4291problem was discovered. See L<perlre>.
b45f050a 4292
6fbc9859 4293=item POSIX syntax [= =] is reserved for future extensions in regex; marked by
e0e4a6e3 4294S<<-- HERE> in m/%s/
b45f050a 4295
7253e4e3
RK
4296(F) Within regular expression character classes ([]) the syntax beginning
4297with "[=" and ending with "=]" is reserved for future extensions. If you
4298need to represent those character sequences inside a regular expression
4299character class, just quote the square brackets with the backslash: "\[="
e0e4a6e3 4300and "=\]". The S<<-- HERE> shows whereabouts in the regular expression the
7253e4e3 4301problem was discovered. See L<perlre>.
b45f050a 4302
bbce6d69 4303=item Possible attempt to put comments in qw() list
4304
e476b1b5 4305(W qw) qw() lists contain items separated by whitespace; as with literal
75b44862 4306strings, comment characters are not ignored, but are instead treated as
be771a83
GS
4307literal data. (You may have used different delimiters than the
4308parentheses shown here; braces are also frequently used.)
bbce6d69 4309
774d564b 4310You probably wrote something like this:
4311
54310121 4312 @list = qw(
774d564b 4313 a # a comment
bbce6d69 4314 b # another comment
774d564b 4315 );
bbce6d69 4316
4317when you should have written this:
4318
774d564b 4319 @list = qw(
54310121 4320 a
4321 b
774d564b 4322 );
4323
4324If you really want comments, build your list the
4325old-fashioned way, with quotes and commas:
4326
4327 @list = (
4328 'a', # a comment
4329 'b', # another comment
4330 );
bbce6d69 4331
4332=item Possible attempt to separate words with commas
4333
be771a83
GS
4334(W qw) qw() lists contain items separated by whitespace; therefore
4335commas aren't needed to separate the items. (You may have used
4336different delimiters than the parentheses shown here; braces are also
4337frequently used.)
bbce6d69 4338
54310121 4339You probably wrote something like this:
bbce6d69 4340
774d564b 4341 qw! a, b, c !;
4342
4343which puts literal commas into some of the list items. Write it without
4344commas if you don't want them to appear in your data:
bbce6d69 4345
774d564b 4346 qw! a b c !;
bbce6d69 4347
a0d0e21e
LW
4348=item Possible memory corruption: %s overflowed 3rd argument
4349
4350(F) An ioctl() or fcntl() returned more than Perl was bargaining for.
4351Perl guesses a reasonable buffer size, but puts a sentinel byte at the
4352end of the buffer just in case. This sentinel byte got clobbered, and
4353Perl assumes that memory is now corrupted. See L<perlfunc/ioctl>.
4354
9da2d046
NT
4355=item Possible precedence issue with control flow operator
4356
4357(W syntax) There is a possible problem with the mixing of a control
4358flow operator (e.g. C<return>) and a low-precedence operator like
4359C<or>. Consider:
4360
4361 sub { return $a or $b; }
4362
4363This is parsed as:
4364
4365 sub { (return $a) or $b; }
4366
4367Which is effectively just:
4368
4369 sub { return $a; }
4370
4371Either use parentheses or the high-precedence variant of the operator.
4372
4373Note this may be also triggered for constructs like:
4374
4375 sub { 1 if die; }
4376
a690c7c4
FC
4377=item Possible precedence problem on bitwise %c operator
4378
4379(W precedence) Your program uses a bitwise logical operator in conjunction
4380with a numeric comparison operator, like this :
4381
4382 if ($x & $y == 0) { ... }
4383
4384This expression is actually equivalent to C<$x & ($y == 0)>, due to the
4385higher precedence of C<==>. This is probably not what you want. (If you
4386really meant to write this, disable the warning, or, better, put the
4387parentheses explicitly and write C<$x & ($y == 0)>).
4388
77772344
B
4389=item Possible unintended interpolation of $\ in regex
4390
4391(W ambiguous) You said something like C<m/$\/> in a regex.
4392The regex C<m/foo$\s+bar/m> translates to: match the word 'foo', the output
8ddb446c 4393record separator (see L<perlvar/$\>) and the letter 's' (one time or more)
77772344
B
4394followed by the word 'bar'.
4395
4396If this is what you intended then you can silence the warning by using
4397C<m/${\}/> (for example: C<m/foo${\}s+bar/>).
4398
4399If instead you intended to match the word 'foo' at the end of the line
4400followed by whitespace and the word 'bar' on the next line then you can use
4401C<m/$(?)\/> (for example: C<m/foo$(?)\s+bar/>).
4402
e5035638
FC
4403=item Possible unintended interpolation of %s in string
4404
ccf3535a 4405(W ambiguous) You said something like '@foo' in a double-quoted string
6903afa2 4406but there was no array C<@foo> in scope at the time. If you wanted a
e5035638
FC
4407literal @foo, then write it as \@foo; otherwise find out what happened
4408to the array you apparently lost track of.
4409
1f25714a
FC
4410=item Postfix dereference is experimental
4411
4412(S experimental::postderef) This warning is emitted if you use
4413the experimental postfix dereference syntax. Simply suppress the
4414warning if you want to use the feature, but know that in doing
4415so you are taking the risk of using an experimental feature which
4416may change or be removed in a future Perl version:
4417
4418 no warnings "experimental::postderef";
4419 use feature "postderef", "postderef_qq";
4420 $ref->$*;
4421 $aref->@*;
4422 $aref->@[@indices];
4423 ... etc ...
4424
a0d0e21e
LW
4425=item Precedence problem: open %s should be open(%s)
4426
e476b1b5 4427(S precedence) The old irregular construct
cb1a09d0 4428
a0d0e21e
LW
4429 open FOO || die;
4430
4431is now misinterpreted as
4432
4433 open(FOO || die);
4434
be771a83
GS
4435because of the strict regularization of Perl 5's grammar into unary and
4436list operators. (The old open was a little of both.) You must put
4437parentheses around the filehandle, or use the new "or" operator instead
4438of "||".
a0d0e21e 4439
3cdd684c
TP
4440=item Premature end of script headers
4441
4442See Server error.
4443
6df41af2
GS
4444=item printf() on closed filehandle %s
4445
be771a83 4446(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 4447before now. Check your control flow.
6df41af2 4448
9a7dcd9c 4449=item print() on closed filehandle %s
a0d0e21e 4450
be771a83 4451(W closed) The filehandle you're printing on got itself closed sometime
c289d2f7 4452before now. Check your control flow.
a0d0e21e 4453
6df41af2 4454=item Process terminated by SIG%s
a0d0e21e 4455
6df41af2
GS
4456(W) This is a standard message issued by OS/2 applications, while *nix
4457applications die in silence. It is considered a feature of the OS/2
4458port. One can easily disable this by appropriate sighandlers, see
4459L<perlipc/"Signals">. See also "Process terminated by SIGTERM/SIGINT"
fecfaeb8 4460in L<perlos2>.
a0d0e21e 4461
e0e4a6e3 4462=item Property '%s' is unknown in regex; marked by S<<-- HERE> in m/%s/
0d0b4b3b 4463
675fa9ff 4464(F) The named property which you specified via C<\p> or C<\P> is not one
0d0b4b3b
KW
4465known to Perl. Perhaps you misspelled the name? See
4466L<perluniprops/Properties accessible through \p{} and \P{}>
675fa9ff
FC
4467for a complete list of available official
4468properties. If it is a L<user-defined property|perlunicode/User-Defined Character Properties>
0d0b4b3b
KW
4469it must have been defined by the time the regular expression is
4470compiled.
4471
327323c1
RGS
4472=item Prototype after '%c' for %s : %s
4473
fa816bf3
FC
4474(W illegalproto) A character follows % or @ in a prototype. This is
4475useless, since % and @ gobble the rest of the subroutine arguments.
327323c1 4476
3fe9a6f1 4477=item Prototype mismatch: %s vs %s
4633a7c4 4478
9a0b3859 4479(S prototype) The subroutine being declared or defined had previously been
be771a83 4480declared or defined with a different function prototype.
4633a7c4 4481
ed9aa3b7
SG
4482=item Prototype not terminated
4483
2a6fd447 4484(F) You've omitted the closing parenthesis in a function prototype
ed9aa3b7
SG
4485definition.
4486
eedb00fa
PM
4487=item Prototype '%s' overridden by attribute 'prototype(%s)' in %s
4488
4489(W prototype) A prototype was declared in both the parentheses after
4490the sub name and via the prototype attribute. The prototype in
4491parentheses is useless, since it will be replaced by the prototype
4492from the attribute before it's ever used.
4493
f9eb106c
FC
4494=item \p{} uses Unicode rules, not locale rules
4495
4496(W) You compiled a regular expression that contained a Unicode property
4497match (C<\p> or C<\P>), but the regular expression is also being told to
4498use the run-time locale, not Unicode. Instead, use a POSIX character
4499class, which should know about the locale's rules.
4500(See L<perlrecharclass/POSIX Character Classes>.)
4501
4502Even if the run-time locale is ISO 8859-1 (Latin1), which is a subset of
4503Unicode, some properties will give results that are not valid for that
4504subset.
4505
4506Here are a couple of examples to help you see what's going on. If the
4507locale is ISO 8859-7, the character at code point 0xD7 is the "GREEK
4508CAPITAL LETTER CHI". But in Unicode that code point means the
4509"MULTIPLICATION SIGN" instead, and C<\p> always uses the Unicode
4510meaning. That means that C<\p{Alpha}> won't match, but C<[[:alpha:]]>
4511should. Only in the Latin1 locale are all the characters in the same
4512positions as they are in Unicode. But, even here, some properties give
4513incorrect results. An example is C<\p{Changes_When_Uppercased}> which
4514is true for "LATIN SMALL LETTER Y WITH DIAERESIS", but since the upper
4515case of that character is not in Latin1, in that locale it doesn't
4516change when upper cased.
4517
0953b66b
FC
4518=item push on reference is experimental
4519
0773cb3e
FC
4520(S experimental::autoderef) C<push> with a scalar argument is experimental
4521and may change or be removed in a future Perl version. If you want to
4522take the risk of using this feature, simply disable this warning:
0953b66b 4523
d401967c 4524 no warnings "experimental::autoderef";
0953b66b
FC
4525
4526=item Quantifier follows nothing in regex; marked by S<< <-- HERE in m/%s/ >>
96ebfdd7 4527
6903afa2 4528(F) You started a regular expression with a quantifier. Backslash it if
e0e4a6e3 4529you meant it literally. The S<<-- HERE> shows whereabouts in the regular
9e3ec65c 4530expression the problem was discovered. See L<perlre>.
96ebfdd7 4531
e0e4a6e3
FC
4532=item Quantifier in {,} bigger than %d in regex; marked by S<<-- HERE> in
4533m/%s/
9baa0206 4534
6903afa2 4535(F) There is currently a limit to the size of the min and max values of
e0e4a6e3 4536the {min,max} construct. The S<<-- HERE> shows whereabouts in the regular
9e3ec65c 4537expression the problem was discovered. See L<perlre>.
9baa0206 4538
675fa9ff
FC
4539=item Quantifier {n,m} with n > m can't match in regex
4540
e0e4a6e3
FC
4541=item Quantifier {n,m} with n > m can't match in regex; marked by
4542S<<-- HERE> in m/%s/
675fa9ff
FC
4543
4544(W regexp) Minima should be less than or equal to maxima. If you really
4545want your regexp to match something 0 times, just put {0}.
4546
b33c0c71
MH
4547=item Quantifier unexpected on zero-length expression in regex; marked by <--
4548HERE in m/%s/
9baa0206 4549
b45f050a
JF
4550(W regexp) You applied a regular expression quantifier in a place where
4551it makes no sense, such as on a zero-width assertion. Try putting the
4552quantifier inside the assertion instead. For example, the way to match
4553"abc" provided that it is followed by three repetitions of "xyz" is
4554C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
9baa0206 4555
9e3ec65c 4556The <-- HERE shows whereabouts in the regular expression the problem was
7253e4e3
RK
4557discovered.
4558
89ea2908
GA
4559=item Range iterator outside integer range
4560
4561(F) One (or both) of the numeric arguments to the range operator ".."
4562are outside the range which can be represented by integers internally.
be771a83
GS
4563One possible workaround is to force Perl to use magical string increment
4564by prepending "0" to your numbers.
89ea2908 4565
3b7fbd4a
SP
4566=item readdir() attempted on invalid dirhandle %s
4567
1a147d38 4568(W io) The dirhandle you're reading from is either closed or not really
3b7fbd4a
SP
4569a dirhandle. Check your control flow.
4570
96ebfdd7
RK
4571=item readline() on closed filehandle %s
4572
4573(W closed) The filehandle you're reading from got itself closed sometime
4574before now. Check your control flow.
4575
b5fe5ca2
SR
4576=item read() on closed filehandle %s
4577
4578(W closed) You tried to read from a closed filehandle.
4579
4580=item read() on unopened filehandle %s
4581
4582(W unopened) You tried to read from a filehandle that was never opened.
4583
de42a5a9 4584=item Reallocation too large: %x
6df41af2
GS
4585
4586(F) You can't allocate more than 64K on an MS-DOS machine.
4587
4ad56ec9
IZ
4588=item realloc() of freed memory ignored
4589
be771a83
GS
4590(S malloc) An internal routine called realloc() on something that had
4591already been freed.
4ad56ec9 4592
a0d0e21e
LW
4593=item Recompile perl with B<-D>DEBUGGING to use B<-D> switch
4594
19b29141 4595(S debugging) You can't use the B<-D> option unless the code to produce
be771a83 4596the desired output is compiled into Perl, which entails some overhead,
a0d0e21e
LW
4597which is why it's currently left out of your copy.
4598
6651ba0b
FC
4599=item Recursive call to Perl_load_module in PerlIO_find_layer
4600
4601(P) It is currently not permitted to load modules when creating
4602a filehandle inside an %INC hook. This can happen with C<open my
4603$fh, '<', \$scalar>, which implicitly loads PerlIO::scalar. Try
4604loading PerlIO::scalar explicitly first.
4605
3e0ccd42 4606=item Recursive inheritance detected in package '%s'
a0d0e21e 4607
2c7d6b9c
RGS
4608(F) While calculating the method resolution order (MRO) of a package, Perl
4609believes it found an infinite loop in the C<@ISA> hierarchy. This is a
4610crude check that bails out after 100 levels of C<@ISA> depth.
a0d0e21e 4611
12605ff9
FC
4612=item refcnt_dec: fd %d%s
4613
2e0cfa16
FC
4614=item refcnt: fd %d%s
4615
12605ff9
FC
4616=item refcnt_inc: fd %d%s
4617
fa816bf3 4618(P) Perl's I/O implementation failed an internal consistency check. If
2e0cfa16
FC
4619you see this message, something is very wrong.
4620
1930e939
TP
4621=item Reference found where even-sized list expected
4622
be771a83 4623(W misc) You gave a single reference where Perl was expecting a list
6903afa2
FC
4624with an even number of elements (for assignment to a hash). This
4625usually means that you used the anon hash constructor when you meant
4626to use parens. In any case, a hash requires key/value B<pairs>.
7b8d334a
GS
4627
4628 %hash = { one => 1, two => 2, }; # WRONG
4629 %hash = [ qw/ an anon array / ]; # WRONG
4630 %hash = ( one => 1, two => 2, ); # right
4631 %hash = qw( one 1 two 2 ); # also fine
4632
810b8aa5
GS
4633=item Reference is already weak
4634
e476b1b5 4635(W misc) You have attempted to weaken a reference that is already weak.
810b8aa5
GS
4636Doing so has no effect.
4637
e0e4a6e3 4638=item Reference to invalid group 0 in regex; marked by S<<-- HERE> in m/%s/
b72d83b2 4639
6903afa2
FC
4640(F) You used C<\g0> or similar in a regular expression. You may refer
4641to capturing parentheses only with strictly positive integers
4642(normal backreferences) or with strictly negative integers (relative
4643backreferences). Using 0 does not make sense.
b72d83b2 4644
e0e4a6e3
FC
4645=item Reference to nonexistent group in regex; marked by S<<-- HERE> in
4646m/%s/
b45f050a
JF
4647
4648(F) You used something like C<\7> in your regular expression, but there are
6903afa2 4649not at least seven sets of capturing parentheses in the expression. If
bbaee129
FC
4650you wanted to have the character with ordinal 7 inserted into the regular
4651expression, prepend zeroes to make it three digits long: C<\007>
9baa0206 4652
9e3ec65c 4653The <-- HERE shows whereabouts in the regular expression the problem was
b45f050a 4654discovered.
9baa0206 4655
e0e4a6e3
FC
4656=item Reference to nonexistent named group in regex; marked by S<<-- HERE>
4657in m/%s/
1a147d38
YO
4658
4659(F) You used something like C<\k'NAME'> or C<< \k<NAME> >> in your regular
9381611c 4660expression, but there is no corresponding named capturing parentheses
6903afa2 4661such as C<(?'NAME'...)> or C<< (?<NAME>...) >>. Check if the name has been
9381611c 4662spelled correctly both in the backreference and the declaration.
1a147d38 4663
9e3ec65c 4664The <-- HERE shows whereabouts in the regular expression the problem was
1a147d38
YO
4665discovered.
4666
e0e4a6e3
FC
4667=item Reference to nonexistent or unclosed group in regex; marked by
4668S<<-- HERE> in m/%s/
1a147d38 4669
bcb95744
FC
4670(F) You used something like C<\g{-7}> in your regular expression, but there
4671are not at least seven sets of closed capturing parentheses in the
4672expression before where the C<\g{-7}> was located.
1a147d38 4673
9e3ec65c 4674The <-- HERE shows whereabouts in the regular expression the problem was
1a147d38
YO
4675discovered.
4676
a0d0e21e
LW
4677=item regexp memory corruption
4678
4679(P) The regular expression engine got confused by what the regular
4680expression compiler gave it.
4681
ff3f26d2
KW
4682=item Regexp modifier "/%c" may appear a maximum of twice
4683
4d910168 4684=item Regexp modifier "%c" may appear a maximum of twice in regex; marked
e0e4a6e3 4685by S<<-- HERE> in m/%s/
4d910168 4686
ce170e67 4687(F) The regular expression pattern had too many occurrences
ff3f26d2 4688of the specified modifier. Remove the extraneous ones.
3955e1a9 4689
6fbc9859
MH
4690=item Regexp modifier "%c" may not appear after the "-" in regex; marked by <--
4691HERE in m/%s/
9442e3b8 4692
f8b5bc72
FC
4693(F) Turning off the given modifier has the side effect of turning on
4694another one. Perl currently doesn't allow this. Reword the regular
9442e3b8
KW
4695expression to use the modifier you want to turn on (and place it before
4696the minus), instead of the one you want to turn off.
4697
591f5ca2
FC
4698=item Regexp modifier "/%c" may not appear twice
4699
4d910168
FC
4700=item Regexp modifier "%c" may not appear twice in regex; marked by <--
4701HERE in m/%s/
4702
ce170e67 4703(F) The regular expression pattern had too many occurrences
591f5ca2
FC
4704of the specified modifier. Remove the extraneous ones.
4705
3955e1a9
KW
4706=item Regexp modifiers "/%c" and "/%c" are mutually exclusive
4707
4d910168 4708=item Regexp modifiers "%c" and "%c" are mutually exclusive in regex;
e0e4a6e3 4709marked by S<<-- HERE> in m/%s/
4d910168 4710
ce170e67 4711(F) The regular expression pattern had more than one of these
3955e1a9
KW
4712mutually exclusive modifiers. Retain only the modifier that is
4713supposed to be there.
4714
aec0ef10 4715=item Regexp out of space in regex m/%s/
a0d0e21e 4716
be771a83
GS
4717(P) A "can't happen" error, because safemalloc() should have caught it
4718earlier.
a0d0e21e 4719
a7f533cb 4720=item Repeated format line will never terminate (~~ and @#)
a1b95068 4721
d7f8936a 4722(F) Your format contains the ~~ repeat-until-blank sequence and a
a1b95068 4723numeric field that will never go blank so that the repetition never
6903afa2 4724terminates. You might use ^# instead. See L<perlform>.
a1b95068 4725
b08e453b
RB
4726=item Replacement list is longer than search list
4727
4728(W misc) You have used a replacement list that is longer than the
fa816bf3 4729search list. So the additional elements in the replacement list
b08e453b
RB
4730are meaningless.
4731
5e0a247b
KW
4732=item '%s' resolved to '\o{%s}%d'
4733
4734(W misc, regexp) You wrote something like C<\08>, or C<\179> in a
4735double-quotish string. All but the last digit is treated as a single
4736character, specified in octal. The last digit is the next character in
4737the string. To tell Perl that this is indeed what you want, you can use
4738the C<\o{ }> syntax, or use exactly three digits to specify the octal
4739for the character.
4740
a0d0e21e
LW
4741=item Reversed %s= operator
4742
be771a83 4743(W syntax) You wrote your assignment operator backwards. The = must
964742a1 4744always come last, to avoid ambiguity with subsequent unary operators.
a0d0e21e 4745
abc7ecad
SP
4746=item rewinddir() attempted on invalid dirhandle %s
4747
1b303a7d
FC
4748(W io) The dirhandle you tried to do a rewinddir() on is either closed
4749or not really a dirhandle. Check your control flow.
abc7ecad 4750
96ebfdd7
RK
4751=item Scalars leaked: %d
4752
7bd1381d 4753(S internal) Something went wrong in Perl's internal bookkeeping
4f5966a5
FC
4754of scalars: not all scalar variables were deallocated by the time
4755Perl exited. What this usually indicates is a memory leak, which
4756is of course bad, especially if the Perl program is intended to be
4757long-running.
96ebfdd7 4758
a0d0e21e
LW
4759=item Scalar value @%s[%s] better written as $%s[%s]
4760
be771a83
GS
4761(W syntax) You've used an array slice (indicated by @) to select a
4762single element of an array. Generally it's better to ask for a scalar
4763value (indicated by $). The difference is that C<$foo[&bar]> always
4764behaves like a scalar, both when assigning to it and when evaluating its
4765argument, while C<@foo[&bar]> behaves like a list when you assign to it,
4766and provides a list context to its subscript, which can do weird things
4767if you're expecting only one subscript.
a0d0e21e 4768
748a9306 4769On the other hand, if you were actually hoping to treat the array
5f05dabc 4770element as a list, you need to look into how references work, because
748a9306
LW
4771Perl will not magically convert between scalars and lists for you. See
4772L<perlref>.
4773
a6006777 4774=item Scalar value @%s{%s} better written as $%s{%s}
4775
75b44862 4776(W syntax) You've used a hash slice (indicated by @) to select a single
be771a83
GS
4777element of a hash. Generally it's better to ask for a scalar value
4778(indicated by $). The difference is that C<$foo{&bar}> always behaves
4779like a scalar, both when assigning to it and when evaluating its
4780argument, while C<@foo{&bar}> behaves like a list when you assign to it,
4781and provides a list context to its subscript, which can do weird things
4782if you're expecting only one subscript.
4783
4784On the other hand, if you were actually hoping to treat the hash element
4785as a list, you need to look into how references work, because Perl will
4786not magically convert between scalars and lists for you. See
a6006777 4787L<perlref>.
4788
a0d0e21e
LW
4789=item Search pattern not terminated
4790
4791(F) The lexer couldn't find the final delimiter of a // or m{}
4792construct. Remember that bracketing delimiters count nesting level.
fb73857a 4793Missing the leading C<$> from a variable C<$m> may cause this error.
a0d0e21e 4794
ea9d9ebc 4795Note that since Perl 5.10.0 a // can also be the I<defined-or>
5d9c98cd 4796construct, not just the empty search pattern. Therefore code written
ea9d9ebc
FC
4797in Perl 5.10.0 or later that uses the // as the I<defined-or> can be
4798misparsed by pre-5.10.0 Perls as a non-terminated search pattern.
5d9c98cd 4799
25c09cbf
SF
4800=item Search pattern not terminated or ternary operator parsed as search pattern
4801
4802(F) The lexer couldn't find the final delimiter of a C<?PATTERN?>
4803construct.
4804
4805The question mark is also used as part of the ternary operator (as in
4806C<foo ? 0 : 1>) leading to some ambiguous constructions being wrongly
6903afa2 4807parsed. One way to disambiguate the parsing is to put parentheses around
25c09cbf
SF
4808the conditional expression, i.e. C<(foo) ? 0 : 1>.
4809
abc7ecad
SP
4810=item seekdir() attempted on invalid dirhandle %s
4811
4812(W io) The dirhandle you are doing a seekdir() on is either closed or not
4813really a dirhandle. Check your control flow.
4814
3257ea4f
FC
4815=item %sseek() on unopened filehandle
4816
4817(W unopened) You tried to use the seek() or sysseek() function on a
4818filehandle that was either never opened or has since been closed.
4819
a0d0e21e
LW
4820=item select not implemented
4821
4822(F) This machine doesn't implement the select() system call.
4823
ae21d580 4824=item Self-ties of arrays and hashes are not supported
68a4a7e4 4825
ae21d580
JH
4826(F) Self-ties are of arrays and hashes are not supported in
4827the current implementation.
68a4a7e4 4828
6df41af2 4829=item Semicolon seems to be missing
a0d0e21e 4830
75b44862
GS
4831(W semicolon) A nearby syntax error was probably caused by a missing
4832semicolon, or possibly some other missing operator, such as a comma.
a0d0e21e
LW
4833
4834=item semi-panic: attempt to dup freed string
4835
be771a83
GS
4836(S internal) The internal newSVsv() routine was called to duplicate a
4837scalar that had previously been marked as free.
a0d0e21e 4838
6df41af2 4839=item sem%s not implemented
a0d0e21e 4840
6df41af2 4841(F) You don't have System V semaphore IPC on your system.
a0d0e21e 4842
69282e91 4843=item send() on closed socket %s
a0d0e21e 4844
be771a83 4845(W closed) The socket you're sending to got itself closed sometime
c289d2f7 4846before now. Check your control flow.
a0d0e21e 4847
e0e4a6e3 4848=item Sequence (? incomplete in regex; marked by S<<-- HERE> in m/%s/
7b8d334a 4849
6903afa2 4850(F) A regular expression ended with an incomplete extension (?. The
e0e4a6e3 4851S<<-- HERE> shows whereabouts in the regular expression the problem was
6903afa2 4852discovered. See L<perlre>.
1b1626e4 4853
e0e4a6e3
FC
4854=item Sequence (?%c...) not implemented in regex; marked by S<<-- HERE> in
4855m/%s/
a0d0e21e 4856
6903afa2 4857(F) A proposed regular expression extension has the character reserved
e0e4a6e3 4858but has not yet been written. The S<<-- HERE> shows whereabouts in the
9e3ec65c 4859regular expression the problem was discovered. See L<perlre>.
b45f050a 4860
e0e4a6e3
FC
4861=item Sequence (?%s...) not recognized in regex; marked by S<<-- HERE> in
4862m/%s/
a0d0e21e 4863
d921c7bf 4864(F) You used a regular expression extension that doesn't make sense.
e0e4a6e3 4865The S<<-- HERE> shows whereabouts in the regular expression the problem was
d921c7bf 4866discovered. This may happen when using the C<(?^...)> construct to tell
fb85c044 4867Perl to use the default regular expression modifiers, and you
9442e3b8 4868redundantly specify a default modifier. For other
9de15fec 4869causes, see L<perlre>.
a0d0e21e 4870
aec0ef10 4871=item Sequence (?#... not terminated in regex m/%s/
6df41af2
GS
4872
4873(F) A regular expression comment must be terminated by a closing
aec0ef10 4874parenthesis. Embedded parentheses aren't allowed. See
7253e4e3 4875L<perlre>.
6df41af2 4876
07ea66ee
FC
4877=item Sequence (?&... not terminated in regex; marked by S<<-- HERE> in
4878m/%s/
4879
4880(F) A named reference of the form C<(?&...)> was missing the final
4881closing parenthesis after the name. The S<<-- HERE> shows whereabouts
4882in the regular expression the problem was discovered.
4883
e0e4a6e3 4884=item Sequence (?%c... not terminated in regex; marked by S<<-- HERE>
4599db5f
FC
4885in m/%s/
4886
4887(F) A named group of the form C<(?'...')> or C<< (?<...>) >> was missing the final
e0e4a6e3 4888closing quote or angle bracket. The S<<-- HERE> shows whereabouts in the
4599db5f
FC
4889regular expression the problem was discovered.
4890
e0e4a6e3 4891=item Sequence (?(%c... not terminated in regex; marked by S<<-- HERE>
4599db5f
FC
4892in m/%s/
4893
4894(F) A named reference of the form C<(?('...')...)> or C<< (?(<...>)...) >> was
4895missing the final closing quote or angle bracket after the name. The
e0e4a6e3 4896S<<-- HERE> shows whereabouts in the regular expression the problem was
4599db5f
FC
4897discovered.
4898
e0e4a6e3
FC
4899=item Sequence \%s... not terminated in regex; marked by S<<-- HERE> in
4900m/%s/
5a25739d
FC
4901
4902(F) The regular expression expects a mandatory argument following the escape
4903sequence and this has been omitted or incorrectly written.
4904
9da1dd8f
DM
4905=item Sequence (?{...}) not terminated with ')'
4906
be149b43
DM
4907(F) The end of the perl code contained within the {...} must be
4908followed immediately by a ')'.
9da1dd8f 4909
e0e4a6e3
FC
4910=item Sequence ?P=... not terminated in regex; marked by S<<-- HERE> in
4911m/%s/
4599db5f
FC
4912
4913(F) A named reference of the form C<(?P=...)> was missing the final
e0e4a6e3 4914closing parenthesis after the name. The S<<-- HERE> shows whereabouts
4599db5f
FC
4915in the regular expression the problem was discovered.
4916
4917=item Sequence (?R) not terminated in regex m/%s/
4918
4919(F) An C<(?R)> or C<(?0)> sequence in a regular expression was missing the
4920final parenthesis.
4921
3d6c5fec 4922=item Server error (a.k.a. "500 Server error")
a5f75d66 4923
6903afa2
FC
4924(A) This is the error message generally seen in a browser window
4925when trying to run a CGI program (including SSI) over the web. The
4926actual error text varies widely from server to server. The most
4927frequently-seen variants are "500 Server error", "Method (something)
4928not permitted", "Document contains no data", "Premature end of script
4929headers", and "Did not produce a valid header".
9607fc9c 4930
4931B<This is a CGI error, not a Perl error>.
4932
6903afa2
FC
4933You need to make sure your script is executable, is accessible by
4934the user CGI is running the script under (which is probably not the
4935user account you tested it under), does not rely on any environment
4936variables (like PATH) from the user it isn't running under, and isn't
4937in a location where the CGI server can't find it, basically, more or
4938less. Please see the following for more information:
9607fc9c 4939
06a5f41f
JH
4940 http://www.perl.org/CGI_MetaFAQ.html
4941 http://www.htmlhelp.org/faq/cgifaq.html
4942 http://www.w3.org/Security/Faq/
a5f75d66 4943
be94a901
GS
4944You should also look at L<perlfaq9>.
4945
a0d0e21e
LW
4946=item setegid() not implemented
4947
be771a83
GS
4948(F) You tried to assign to C<$)>, and your operating system doesn't
4949support the setegid() system call (or equivalent), or at least Configure
4950didn't think so.
a0d0e21e
LW
4951
4952=item seteuid() not implemented
4953
be771a83
GS
4954(F) You tried to assign to C<< $> >>, and your operating system doesn't
4955support the seteuid() system call (or equivalent), or at least Configure
4956didn't think so.
a0d0e21e 4957
81777298
GS
4958=item setpgrp can't take arguments
4959
be771a83
GS
4960(F) Your system has the setpgrp() from BSD 4.2, which takes no
4961arguments, unlike POSIX setpgid(), which takes a process ID and process
4962group ID.
81777298 4963
a0d0e21e
LW
4964=item setrgid() not implemented
4965
be771a83
GS
4966(F) You tried to assign to C<$(>, and your operating system doesn't
4967support the setrgid() system call (or equivalent), or at least Configure
4968didn't think so.
a0d0e21e
LW
4969
4970=item setruid() not implemented
4971
be771a83
GS
4972(F) You tried to assign to C<$<>, and your operating system doesn't
4973support the setruid() system call (or equivalent), or at least Configure
4974didn't think so.
a0d0e21e 4975
6df41af2
GS
4976=item setsockopt() on closed socket %s
4977
be771a83
GS
4978(W closed) You tried to set a socket option on a closed socket. Did you
4979forget to check the return value of your socket() call? See
6df41af2
GS
4980L<perlfunc/setsockopt>.
4981
6da34ecb
FC
4982=item Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef
4983
4984(W deprecated) You assigned a reference to a scalar to C<$/> where the
eedc0d19 4985referenced item is not a positive integer. In older perls this B<appeared>
6da34ecb
FC
4986to work the same as setting it to C<undef> but was in fact internally
4987different, less efficient and with very bad luck could have resulted in
4988your file being split by a stringified form of the reference.
4989
ea9d9ebc 4990In Perl 5.20.0 this was changed so that it would be B<exactly> the same as
6da34ecb
FC
4991setting C<$/> to undef, with the exception that this warning would be
4992thrown.
4993
eedc0d19
FC
4994You are recommended to change your code to set C<$/> to C<undef> explicitly
4995if you wish to slurp the file. In future versions of Perl assigning
4996a reference to will throw a fatal error.
6da34ecb 4997
ee0ba734 4998=item Setting $/ to %s reference is forbidden
a48e4205
FC
4999
5000(F) You tried to assign a reference to a non integer to C<$/>. In older
5001Perls this would have behaved similarly to setting it to a reference to
5002a positive integer, where the integer was the address of the reference.
5003As of Perl 5.20.0 this is a fatal error, to allow future versions of Perl
5004to use non-integer refs for more interesting purposes.
5005
0953b66b
FC
5006=item shift on reference is experimental
5007
d401967c 5008(S experimental::autoderef) C<shift> with a scalar argument is experimental
0953b66b
FC
5009and may change or be removed in a future Perl version. If you want to
5010take the risk of using this feature, simply disable this warning:
5011
d401967c 5012 no warnings "experimental::autoderef";
0953b66b 5013
a0d0e21e
LW
5014=item shm%s not implemented
5015
5016(F) You don't have System V shared memory IPC on your system.
5017
984200d0
YST
5018=item !=~ should be !~
5019
5020(W syntax) The non-matching operator is !~, not !=~. !=~ will be
5021interpreted as the != (numeric not equal) and ~ (1's complement)
5022operators: probably not what you intended.
5023
6df41af2
GS
5024=item <> should be quotes
5025
5026(F) You wrote C<< require <file> >> when you should have written
5027C<require 'file'>.
5028
5029=item /%s/ should probably be written as "%s"
5030
5031(W syntax) You have used a pattern where Perl expected to find a string,
be771a83
GS
5032as in the first argument to C<join>. Perl will treat the true or false
5033result of matching the pattern against $_ as the string, which is
5034probably not what you had in mind.
6df41af2 5035
69282e91 5036=item shutdown() on closed socket %s
a0d0e21e 5037
75b44862
GS
5038(W closed) You tried to do a shutdown on a closed socket. Seems a bit
5039superfluous.
a0d0e21e 5040
f86702cc 5041=item SIG%s handler "%s" not defined
a0d0e21e 5042
be771a83
GS
5043(W signal) The signal handler named in %SIG doesn't, in fact, exist.
5044Perhaps you put it into the wrong package?
a0d0e21e 5045
efc859fb
FC
5046=item Slab leaked from cv %p
5047
5048(S) If you see this message, then something is seriously wrong with the
5049internal bookkeeping of op trees. An op tree needed to be freed after
5050a compilation error, but could not be found, so it was leaked instead.
5051
3b9aea04
SH
5052=item sleep(%u) too large
5053
5054(W overflow) You called C<sleep> with a number that was larger than
5055it can reliably handle and C<sleep> probably slept for less time than
5056requested.
5057
30d9c59b
Z
5058=item Slurpy parameter not last
5059
5060(F) In a subroutine signature, you put something after a slurpy (array or
5061hash) parameter. The slurpy parameter takes all the available arguments,
5062so there can't be any left to fill later parameters.
5063
675fa9ff
FC
5064=item Smart matching a non-overloaded object breaks encapsulation
5065
5066(F) You should not use the C<~~> operator on an object that does not
5067overload it: Perl refuses to use the object's underlying structure
5068for the smart match.
5069
0f539b13
BF
5070=item Smartmatch is experimental
5071
5072(S experimental::smartmatch) This warning is emitted if you
5073use the smartmatch (C<~~>) operator. This is currently an experimental
5074feature, and its details are subject to change in future releases of
5075Perl. Particularly, its current behavior is noticed for being
5076unnecessarily complex and unintuitive, and is very likely to be
5077overhauled.
5078
a0d0e21e
LW
5079=item sort is now a reserved word
5080
5081(F) An ancient error message that almost nobody ever runs into anymore.
5082But before sort was a keyword, people sometimes used it as a filehandle.
5083
a0d0e21e
LW
5084=item Sort subroutine didn't return single value
5085
d747172a
FC
5086(F) A sort comparison subroutine written in XS must return exactly one
5087item. See L<perlfunc/sort>.
a0d0e21e 5088
f1c31c52
FC
5089=item Source filters apply only to byte streams
5090
5091(F) You tried to activate a source filter (usually by loading a
5092source filter module) within a string passed to C<eval>. This is
5093not permitted under the C<unicode_eval> feature. Consider using
5094C<evalbytes> instead. See L<feature>.
5095
8cbc2e3b
JH
5096=item splice() offset past end of array
5097
5098(W misc) You attempted to specify an offset that was past the end of
fa816bf3
FC
5099the array passed to splice(). Splicing will instead commence at the
5100end of the array, rather than past it. If this isn't what you want,
5101try explicitly pre-extending the array by assigning $#array = $offset.
5102See L<perlfunc/splice>.
8cbc2e3b 5103
0953b66b
FC
5104=item splice on reference is experimental
5105
0773cb3e
FC
5106(S experimental::autoderef) C<splice> with a scalar argument
5107is experimental and may change or be removed in a future
5108Perl version. If you want to take the risk of using this
5109feature, simply disable this warning:
0953b66b 5110
d401967c 5111 no warnings "experimental::autoderef";
0953b66b 5112
a0d0e21e
LW
5113=item Split loop
5114
be771a83
GS
5115(P) The split was looping infinitely. (Obviously, a split shouldn't
5116iterate more times than there are characters of input, which is what
6903afa2 5117happened.) See L<perlfunc/split>.
a0d0e21e 5118
a0d0e21e
LW
5119=item Statement unlikely to be reached
5120
be771a83
GS
5121(W exec) You did an exec() with some statement after it other than a
5122die(). This is almost always an error, because exec() never returns
5123unless there was a failure. You probably wanted to use system()
5124instead, which does return. To suppress this warning, put the exec() in
5125a block by itself.
a0d0e21e 5126
a2e39214
FC
5127=item "state %s" used in sort comparison
5128
5129(W syntax) The package variables $a and $b are used for sort comparisons.
5130You used $a or $b in as an operand to the C<< <=> >> or C<cmp> operator inside a
5131sort comparison block, and the variable had earlier been declared as a
5132lexical variable. Either qualify the sort variable with the package
5133name, or rename the lexical variable.
5134
5a25739d
FC
5135=item "state" variable %s can't be in a package
5136
5137(F) Lexically scoped variables aren't in a package, so it doesn't make
5138sense to try to declare one with a package qualifier on the front. Use
5139local() if you want to localize a package variable.
5140
9ddeeac9 5141=item stat() on unopened filehandle %s
6df41af2 5142
355b1299
JH
5143(W unopened) You tried to use the stat() function on a filehandle that
5144was either never opened or has since been closed.
6df41af2 5145
5a25739d
FC
5146=item Strings with code points over 0xFF may not be mapped into in-memory file handles
5147
5148(W utf8) You tried to open a reference to a scalar for read or append
5149where the scalar contained code points over 0xFF. In-memory files
5150model on-disk files and can only contain bytes.
5151
fe13d51d 5152=item Stub found while resolving method "%s" overloading "%s" in package "%s"
e7ea3e70 5153
be771a83
GS
5154(P) Overloading resolution over @ISA tree may be broken by importation
5155stubs. Stubs should never be implicitly created, but explicit calls to
5156C<can> may break this.
e7ea3e70 5157
4e85e1b4
FC
5158=item Subroutine "&%s" is not available
5159
5160(W closure) During compilation, an inner named subroutine or eval is
5161attempting to capture an outer lexical subroutine that is not currently
5162available. This can happen for one of two reasons. First, the lexical
c387a7d0
FC
5163subroutine may be declared in an outer anonymous subroutine that has
5164not yet been created. (Remember that named subs are created at compile
5165time, while anonymous subs are created at run-time.) For example,
4e85e1b4
FC
5166
5167 sub { my sub a {...} sub f { \&a } }
5168
c387a7d0 5169At the time that f is created, it can't capture the current "a" sub,
4e85e1b4
FC
5170since the anonymous subroutine hasn't been created yet. Conversely, the
5171following won't give a warning since the anonymous subroutine has by now
5172been created and is live:
5173
5174 sub { my sub a {...} eval 'sub f { \&a }' }->();
5175
c387a7d0
FC
5176The second situation is caused by an eval accessing a lexical subroutine
5177that has gone out of scope, for example,
4e85e1b4
FC
5178
5179 sub f {
5180 my sub a {...}
5181 sub { eval '\&a' }
5182 }
5183 f()->();
5184
5185Here, when the '\&a' in the eval is being compiled, f() is not currently
5186being executed, so its &a is not available for capture.
5187
4eb94d7c
FC
5188=item "%s" subroutine &%s masks earlier declaration in same %s
5189
5190(W misc) A "my" or "state" subroutine has been redeclared in the
5191current scope or statement, effectively eliminating all access to
5192the previous instance. This is almost always a typographical error.
5193Note that the earlier subroutine will still exist until the end of
20d33786 5194the scope or until all closure references to it are destroyed.
4eb94d7c 5195
a0d0e21e
LW
5196=item Subroutine %s redefined
5197
e476b1b5 5198(W redefine) You redefined a subroutine. To suppress this warning, say
a0d0e21e
LW
5199
5200 {
271595cc 5201 no warnings 'redefine';
a0d0e21e
LW
5202 eval "sub name { ... }";
5203 }
5204
5205=item Substitution loop
5206
be771a83
GS
5207(P) The substitution was looping infinitely. (Obviously, a substitution
5208shouldn't iterate more times than there are characters of input, which
5209is what happened.) See the discussion of substitution in
5d44bfff 5210L<perlop/"Regexp Quote-Like Operators">.
a0d0e21e
LW
5211
5212=item Substitution pattern not terminated
5213
d1be9408 5214(F) The lexer couldn't find the interior delimiter of an s/// or s{}{}
a0d0e21e 5215construct. Remember that bracketing delimiters count nesting level.
fb73857a 5216Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
5217
5218=item Substitution replacement not terminated
5219
d1be9408 5220(F) The lexer couldn't find the final delimiter of an s/// or s{}{}
a0d0e21e 5221construct. Remember that bracketing delimiters count nesting level.
fb73857a 5222Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
5223
5224=item substr outside of string
5225
8a9eb13d 5226(W substr)(F) You tried to reference a substr() that pointed outside of
be771a83
GS
5227a string. That is, the absolute value of the offset was larger than the
5228length of the string. See L<perlfunc/substr>. This warning is fatal if
5229substr is used in an lvalue context (as the left hand side of an
5230assignment or as a subroutine argument for example).
a0d0e21e 5231
bf1320bf
RGS
5232=item sv_upgrade from type %d down to type %d
5233
9d277376 5234(P) Perl tried to force the upgrade of an SV to a type which was actually
bf1320bf
RGS
5235inferior to its current type.
5236
05a40652
FC
5237=item SWASHNEW didn't return an HV ref
5238
5239(P) Something went wrong internally when Perl was trying to look up
5240Unicode characters.
5241
6fbc9859 5242=item Switch (?(condition)... contains too many branches in regex; marked by
e0e4a6e3 5243S<<-- HERE> in m/%s/
b45f050a 5244
fa816bf3
FC
5245(F) A (?(condition)if-clause|else-clause) construct can have at most
5246two branches (the if-clause and the else-clause). If you want one or
5247both to contain alternation, such as using C<this|that|other>, enclose
5248it in clustering parentheses:
b45f050a
JF
5249
5250 (?(condition)(?:this|that|other)|else-clause)
5251
e0e4a6e3 5252The S<<-- HERE> shows whereabouts in the regular expression the problem
fa816bf3 5253was discovered. See L<perlre>.
b45f050a 5254
e0e4a6e3
FC
5255=item Switch condition not recognized in regex; marked by S<<-- HERE> in
5256m/%s/
b45f050a 5257
9f57786a
FC
5258(F) The condition part of a (?(condition)if-clause|else-clause) construct
5259is not known. The condition must be one of the following:
5260
5261 (1) (2) ... true if 1st, 2nd, etc., capture matched
5262 (<NAME>) ('NAME') true if named capture matched
5263 (?=...) (?<=...) true if subpattern matches
5264 (?!...) (?<!...) true if subpattern fails to match
5265 (?{ CODE }) true if code returns a true value
5266 (R) true if evaluating inside recursion
5267 (R1) (R2) ... true if directly inside capture group 1, 2, etc.
5268 (R&NAME) true if directly inside named capture
5269 (DEFINE) always false; for defining named subpatterns
5270
5271The <-- HERE shows whereabouts in the regular expression the problem was
5272discovered. See L<perlre>.
b45f050a 5273
85ab1d1d
JH
5274=item switching effective %s is not implemented
5275
be771a83
GS
5276(F) While under the C<use filetest> pragma, we cannot switch the real
5277and effective uids or gids.
85ab1d1d 5278
a0d0e21e
LW
5279=item syntax error
5280
5281(F) Probably means you had a syntax error. Common reasons include:
5282
5283 A keyword is misspelled.
5284 A semicolon is missing.
5285 A comma is missing.
5286 An opening or closing parenthesis is missing.
5287 An opening or closing brace is missing.
5288 A closing quote is missing.
5289
5290Often there will be another error message associated with the syntax
5291error giving more information. (Sometimes it helps to turn on B<-w>.)
5292The error message itself often tells you where it was in the line when
5293it decided to give up. Sometimes the actual error is several tokens
5f05dabc 5294before this, because Perl is good at understanding random input.
a0d0e21e
LW
5295Occasionally the line number may be misleading, and once in a blue moon
5296the only way to figure out what's triggering the error is to call
5297C<perl -c> repeatedly, chopping away half the program each time to see
524e9188 5298if the error went away. Sort of the cybernetic version of S<20 questions>.
a0d0e21e 5299
ccf3535a 5300=item syntax error at line %d: '%s' unexpected
cb1a09d0 5301
be771a83
GS
5302(A) You've accidentally run your script through the Bourne shell instead
5303of Perl. Check the #! line, or manually feed your script into Perl
5304yourself.
cb1a09d0 5305
25f58aea
PN
5306=item syntax error in file %s at line %d, next 2 tokens "%s"
5307
5308(F) This error is likely to occur if you run a perl5 script through
5309a perl4 interpreter, especially if the next 2 tokens are "use strict"
5310or "my $var" or "our $var".
5311
675fa9ff
FC
5312=item Syntax error in (?[...]) in regex m/%s/
5313
5314(F) Perl could not figure out what you meant inside this construct; this
5315notifies you that it is giving up trying.
5316
591f5ca2
FC
5317=item %s syntax OK
5318
5319(F) The final summary message when a C<perl -c> succeeds.
5320
b5fe5ca2
SR
5321=item sysread() on closed filehandle %s
5322
5323(W closed) You tried to read from a closed filehandle.
5324
5325=item sysread() on unopened filehandle %s
5326
5327(W unopened) You tried to read from a filehandle that was never opened.
5328
6087ac44 5329=item System V %s is not implemented on this machine
a0d0e21e 5330
6087ac44
JH
5331(F) You tried to do something with a function beginning with "sem",
5332"shm", or "msg" but that System V IPC is not implemented in your
5333machine. In some machines the functionality can exist but be
5334unconfigured. Consult your system support.
a0d0e21e 5335
69282e91 5336=item syswrite() on closed filehandle %s
a0d0e21e 5337
be771a83 5338(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 5339before now. Check your control flow.
a0d0e21e 5340
96ebfdd7
RK
5341=item C<-T> and C<-B> not implemented on filehandles
5342
5343(F) Perl can't peek at the stdio buffer of filehandles when it doesn't
5344know about your kind of stdio. You'll have to use a filename instead.
5345
fc36a67e 5346=item Target of goto is too deeply nested
5347
be771a83
GS
5348(F) You tried to use C<goto> to reach a label that was too deeply nested
5349for Perl to reach. Perl is doing you a favor by refusing.
fc36a67e 5350
abc7ecad
SP
5351=item telldir() attempted on invalid dirhandle %s
5352
5353(W io) The dirhandle you tried to telldir() is either closed or not really
5354a dirhandle. Check your control flow.
5355
c2771421
FC
5356=item tell() on unopened filehandle
5357
5358(W unopened) You tried to use the tell() function on a filehandle that
5359was either never opened or has since been closed.
5360
b82b06b8
FC
5361=item That use of $[ is unsupported
5362
5363(F) Assignment to C<$[> is now strictly circumscribed, and interpreted
5364as a compiler directive. You may say only one of
5365
5366 $[ = 0;
5367 $[ = 1;
5368 ...
5369 local $[ = 0;
5370 local $[ = 1;
5371 ...
5372
5373This is to prevent the problem of one module changing the array base out
5374from under another module inadvertently. See L<perlvar/$[> and L<arybase>.
5375
67b16946 5376=item The crypt() function is unimplemented due to excessive paranoia.
a0d0e21e
LW
5377
5378(F) Configure couldn't find the crypt() function on your machine,
5379probably because your vendor didn't supply it, probably because they
8b1a09fc 5380think the U.S. Government thinks it's a secret, or at least that they
a0d0e21e
LW
5381will continue to pretend that it is. And if you quote me on that, I
5382will deny it.
5383
675fa9ff
FC
5384=item The %s function is unimplemented
5385
5386(F) The function indicated isn't implemented on this architecture,
5387according to the probings of Configure.
5388
64fbf0dd 5389=item The lexical_subs feature is experimental
ebd25686 5390
64fbf0dd
FC
5391(S experimental::lexical_subs) This warning is emitted if you
5392declare a sub with C<my> or C<state>. Simply suppress the warning
5393if you want to use the feature, but know that in doing so you
5394are taking the risk of using an experimental feature which may
5395change or be removed in a future Perl version:
ebd25686 5396
f1d34ca8 5397 no warnings "experimental::lexical_subs";
ebd25686 5398 use feature "lexical_subs";
64fbf0dd 5399 my sub foo { ... }
ebd25686 5400
0d0b4b3b
KW
5401=item The regex_sets feature is experimental
5402
5403(S experimental::regex_sets) This warning is emitted if you
5404use the syntax S<C<(?[ ])>> in a regular expression.
5405The details of this feature are subject to change.
5406if you want to use it, but know that in doing so you
5407are taking the risk of using an experimental feature which may
5408change in a future Perl version, you can do this to silence the
5409warning:
5410
5411 no warnings "experimental::regex_sets";
5412
30d9c59b
Z
5413=item The signatures feature is experimental
5414
5415(S experimental::signatures) This warning is emitted if you unwrap a
5416subroutine's arguments using a signature. Simply suppress the warning
5417if you want to use the feature, but know that in doing so you are taking
5418the risk of using an experimental feature which may change or be removed
5419in a future Perl version:
5420
5421 no warnings "experimental::signatures";
5422 use feature "signatures";
5423 sub foo ($left, $right) { ... }
5424
5e1c7ca2 5425=item The stat preceding %s wasn't an lstat
a0d0e21e 5426
be771a83
GS
5427(F) It makes no sense to test the current stat buffer for symbolic
5428linkhood if the last stat that wrote to the stat buffer already went
5429past the symlink to get to the real file. Use an actual filename
5430instead.
a0d0e21e 5431
371fce9b
DM
5432=item The 'unique' attribute may only be applied to 'our' variables
5433
1108974d 5434(F) This attribute was never supported on C<my> or C<sub> declarations.
371fce9b 5435
437784d6 5436=item This Perl can't reset CRTL environ elements (%s)
f675dbe5
CB
5437
5438=item This Perl can't set CRTL environ elements (%s=%s)
5439
75b44862 5440(W internal) Warnings peculiar to VMS. You tried to change or delete an
be771a83
GS
5441element of the CRTL's internal environ array, but your copy of Perl
5442wasn't built with a CRTL that contained the setenv() function. You'll
5443need to rebuild Perl with a CRTL that does, or redefine
5444F<PERL_ENV_TABLES> (see L<perlvms>) so that the environ array isn't the
5445target of the change to
f675dbe5
CB
5446%ENV which produced the warning.
5447
6a5b4183
YO
5448=item This Perl has not been built with support for randomized hash key traversal but something called Perl_hv_rand_set().
5449
5450(F) Something has attempted to use an internal API call which
5451depends on Perl being compiled with the default support for randomized hash
f26c79ba 5452key traversal, but this Perl has been compiled without it. You should
6a5b4183
YO
5453report this warning to the relevant upstream party, or recompile perl
5454with default options.
5455
a0d0e21e
LW
5456=item times not implemented
5457
be771a83
GS
5458(F) Your version of the C library apparently doesn't do times(). I
5459suspect you're not running on Unix.
a0d0e21e 5460
6d3b25aa
RGS
5461=item "-T" is on the #! line, it must also be used on the command line
5462
b7e4ecc1
FC
5463(X) The #! line (or local equivalent) in a Perl script contains
5464the B<-T> option (or the B<-t> option), but Perl was not invoked with
5465B<-T> in its command line. This is an error because, by the time
5466Perl discovers a B<-T> in a script, it's too late to properly taint
5467everything from the environment. So Perl gives up.
6d3b25aa
RGS
5468
5469If the Perl script is being executed as a command using the #!
b7e4ecc1
FC
5470mechanism (or its local equivalent), this error can usually be
5471fixed by editing the #! line so that the B<-%c> option is a part of
5472Perl's first argument: e.g. change C<perl -n -%c> to C<perl -%c -n>.
6d3b25aa
RGS
5473
5474If the Perl script is being executed as C<perl scriptname>, then the
fe13d51d 5475B<-%c> option must appear on the command line: C<perl -%c scriptname>.
6d3b25aa 5476
3a2263fe
RGS
5477=item To%s: illegal mapping '%s'
5478
5479(F) You tried to define a customized To-mapping for lc(), lcfirst,
5480uc(), or ucfirst() (or their string-inlined versions), but you
5481specified an illegal mapping.
5482See L<perlunicode/"User-Defined Character Properties">.
5483
49704364
WL
5484=item Too deeply nested ()-groups
5485
1a147d38 5486(F) Your template contains ()-groups with a ridiculously deep nesting level.
49704364 5487
a0d0e21e
LW
5488=item Too few args to syscall
5489
5490(F) There has to be at least one argument to syscall() to specify the
5491system call to call, silly dilly.
5492
30d9c59b
Z
5493=item Too few arguments for subroutine
5494
5495(F) A subroutine using a signature received fewer arguments than required
5496by the signature. The caller of the subroutine is presumably at fault.
5497Inconveniently, this error will be reported at the location of the
5498subroutine, not that of the caller.
5499
96ebfdd7
RK
5500=item Too late for "-%s" option
5501
5502(X) The #! line (or local equivalent) in a Perl script contains the
4ba71d51
FC
5503B<-M>, B<-m> or B<-C> option.
5504
6903afa2
FC
5505In the case of B<-M> and B<-m>, this is an error because those options
5506are not intended for use inside scripts. Use the C<use> pragma instead.
4ba71d51 5507
6903afa2
FC
5508The B<-C> option only works if it is specified on the command line as
5509well (with the same sequence of letters or numbers following). Either
5510specify this option on the command line, or, if your system supports
5511it, make your script executable and run it directly instead of passing
5512it to perl.
96ebfdd7 5513
ddda08b7
GS
5514=item Too late to run %s block
5515
5516(W void) A CHECK or INIT block is being defined during run time proper,
5517when the opportunity to run them has already passed. Perhaps you are
be771a83
GS
5518loading a file with C<require> or C<do> when you should be using C<use>
5519instead. Or perhaps you should put the C<require> or C<do> inside a
5520BEGIN block.
ddda08b7 5521
a0d0e21e
LW
5522=item Too many args to syscall
5523
5f05dabc 5524(F) Perl supports a maximum of only 14 args to syscall().
a0d0e21e
LW
5525
5526=item Too many arguments for %s
5527
5528(F) The function requires fewer arguments than you specified.
5529
30d9c59b
Z
5530=item Too many arguments for subroutine
5531
5532(F) A subroutine using a signature received more arguments than required
5533by the signature. The caller of the subroutine is presumably at fault.
5534Inconveniently, this error will be reported at the location of the
5535subroutine, not that of the caller.
5536
6df41af2
GS
5537=item Too many )'s
5538
49704364
WL
5539(A) You've accidentally run your script through B<csh> instead of Perl.
5540Check the #! line, or manually feed your script into Perl yourself.
5541
8c40cb74
NC
5542=item Too many ('s
5543
be771a83
GS
5544(A) You've accidentally run your script through B<csh> instead of Perl.
5545Check the #! line, or manually feed your script into Perl yourself.
6df41af2 5546
7253e4e3 5547=item Trailing \ in regex m/%s/
a0d0e21e 5548
be771a83
GS
5549(F) The regular expression ends with an unbackslashed backslash.
5550Backslash it. See L<perlre>.
a0d0e21e 5551
bd299e29
KW
5552=item Trailing white-space in a charnames alias definition is deprecated
5553
94ec3a20
FC
5554(D deprecated) You defined a character name which ended in a space
5555character. Remove the trailing space(s). Usually these names are
5556defined in the C<:alias> import argument to C<use charnames>, but they
5557could be defined by a translator installed into C<$^H{charnames}>.
bd299e29
KW
5558See L<charnames/CUSTOM ALIASES>.
5559
2c268ad5 5560=item Transliteration pattern not terminated
a0d0e21e
LW
5561
5562(F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
fb73857a 5563or y/// or y[][] construct. Missing the leading C<$> from variables
5564C<$tr> or C<$y> may cause this error.
a0d0e21e 5565
2c268ad5 5566=item Transliteration replacement not terminated
a0d0e21e 5567
6a36df5d
YST
5568(F) The lexer couldn't find the final delimiter of a tr///, tr[][],
5569y/// or y[][] construct.
a0d0e21e 5570
96ebfdd7
RK
5571=item '%s' trapped by operation mask
5572
5573(F) You tried to use an operator from a Safe compartment in which it's
6903afa2 5574disallowed. See L<Safe>.
96ebfdd7 5575
a0d0e21e
LW
5576=item truncate not implemented
5577
5578(F) Your machine doesn't implement a file truncation mechanism that
5579Configure knows about.
5580
19c481f4
FC
5581=item Type of arg %d to &CORE::%s must be %s
5582
5583(F) The subroutine in question in the CORE package requires its argument
5584to be a hard reference to data of the specified type. Overloading is
5585ignored, so a reference to an object that is not the specified type, but
5586nonetheless has overloading to handle it, will still not be accepted.
5587
a0d0e21e
LW
5588=item Type of arg %d to %s must be %s (not %s)
5589
5590(F) This function requires the argument in that position to be of a
8b1a09fc 5591certain type. Arrays must be @NAME or C<@{EXPR}>. Hashes must be
5592%NAME or C<%{EXPR}>. No implicit dereferencing is allowed--use the
a0d0e21e
LW
5593{EXPR} forms as an explicit dereference. See L<perlref>.
5594
7ac5715b 5595=item Type of argument to %s must be unblessed hashref or arrayref
cba5a3b0 5596
7ac5715b
FC
5597(F) You called C<keys>, C<values> or C<each> with a scalar argument that
5598was not a reference to an unblessed hash or array.
cba5a3b0 5599
eec2d3df
GS
5600=item umask not implemented
5601
be771a83
GS
5602(F) Your machine doesn't implement the umask function and you tried to
5603use it to restrict permissions for yourself (EXPR & 0700).
a0d0e21e
LW
5604
5605=item Unbalanced context: %d more PUSHes than POPs
5606
c632e777 5607(S internal) The exit code detected an internal inconsistency in how
be771a83 5608many execution contexts were entered and left.
a0d0e21e
LW
5609
5610=item Unbalanced saves: %d more saves than restores
5611
4a983e45 5612(S internal) The exit code detected an internal inconsistency in how
be771a83 5613many values were temporarily localized.
a0d0e21e
LW
5614
5615=item Unbalanced scopes: %d more ENTERs than LEAVEs
5616
090cebb2 5617(S internal) The exit code detected an internal inconsistency in how
be771a83 5618many blocks were entered and left.
a0d0e21e 5619
6651ba0b
FC
5620=item Unbalanced string table refcount: (%d) for "%s"
5621
31ff3bd2 5622(S internal) On exit, Perl found some strings remaining in the shared
6651ba0b
FC
5623string table used for copy on write and for hash keys. The entries
5624should have been freed, so this indicates a bug somewhere.
5625
a0d0e21e
LW
5626=item Unbalanced tmps: %d more allocs than frees
5627
2092d7c1 5628(S internal) The exit code detected an internal inconsistency in how
be771a83 5629many mortal scalars were allocated and freed.
a0d0e21e
LW
5630
5631=item Undefined format "%s" called
5632
5633(F) The format indicated doesn't seem to exist. Perhaps it's really in
5634another package? See L<perlform>.
5635
5636=item Undefined sort subroutine "%s" called
5637
be771a83
GS
5638(F) The sort comparison routine specified doesn't seem to exist.
5639Perhaps it's in a different package? See L<perlfunc/sort>.
a0d0e21e
LW
5640
5641=item Undefined subroutine &%s called
5642
be771a83
GS
5643(F) The subroutine indicated hasn't been defined, or if it was, it has
5644since been undefined.
a0d0e21e
LW
5645
5646=item Undefined subroutine called
5647
5648(F) The anonymous subroutine you're trying to call hasn't been defined,
5649or if it was, it has since been undefined.
5650
5651=item Undefined subroutine in sort
5652
be771a83
GS
5653(F) The sort comparison routine specified is declared but doesn't seem
5654to have been defined yet. See L<perlfunc/sort>.
a0d0e21e 5655
4633a7c4
LW
5656=item Undefined top format "%s" called
5657
5658(F) The format indicated doesn't seem to exist. Perhaps it's really in
5659another package? See L<perlform>.
5660
20408e3c
GS
5661=item Undefined value assigned to typeglob
5662
be771a83
GS
5663(W misc) An undefined value was assigned to a typeglob, a la
5664C<*foo = undef>. This does nothing. It's possible that you really mean
5665C<undef *foo>.
20408e3c 5666
6df41af2
GS
5667=item %s: Undefined variable
5668
be771a83
GS
5669(A) You've accidentally run your script through B<csh> instead of Perl.
5670Check the #! line, or manually feed your script into Perl yourself.
6df41af2 5671
a0d0e21e
LW
5672=item unexec of %s into %s failed!
5673
5674(F) The unexec() routine failed for some reason. See your local FSF
5675representative, who probably put it there in the first place.
5676
e0e4a6e3
FC
5677=item Unexpected binary operator '%c' with no preceding operand in regex;
5678marked by S<<-- HERE> in m/%s/
0d0b4b3b 5679
675fa9ff 5680(F) You had something like this:
0d0b4b3b
KW
5681
5682 (?[ | \p{Digit} ])
5683
5684where the C<"|"> is a binary operator with an operand on the right, but
5685no operand on the left.
5686
e0e4a6e3 5687=item Unexpected character in regex; marked by S<<-- HERE> in m/%s/
0d0b4b3b 5688
675fa9ff 5689(F) You had something like this:
0d0b4b3b
KW
5690
5691 (?[ z ])
5692
5693Within C<(?[ ])>, no literal characters are allowed unless they are
5694within an inner pair of square brackets, like
5695
5696 (?[ [ z ] ])
5697
5698Another possibility is that you forgot a backslash. Perl isn't smart
5699enough to figure out what you really meant.
5700
6651ba0b
FC
5701=item Unexpected constant lvalue entersub entry via type/targ %d:%d
5702
5703(P) When compiling a subroutine call in lvalue context, Perl failed an
5704internal consistency check. It encountered a malformed op tree.
5705
6c341f67
TC
5706=item Unexpected exit %u
5707
5708(S) exit() was called or the script otherwise finished gracefully when
5709C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.
5710
878ce265 5711=item Unexpected exit failure %d
6c341f67
TC
5712
5713(S) An uncaught die() was called when C<PERL_EXIT_WARN> was set in
5714C<PL_exit_flags>.
5715
e0e4a6e3 5716=item Unexpected ')' in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
5717
5718(F) You had something like this:
5719
5720 (?[ ( \p{Digit} + ) ])
5721
5722The C<")"> is out-of-place. Something apparently was supposed to
5723be combined with the digits, or the C<"+"> shouldn't be there, or
5724something like that. Perl can't figure out what was intended.
5725
e0e4a6e3
FC
5726=item Unexpected '(' with no preceding operator in regex; marked by
5727S<<-- HERE> in m/%s/
675fa9ff
FC
5728
5729(F) You had something like this:
5730
5731 (?[ \p{Digit} ( \p{Lao} + \p{Thai} ) ])
5732
5733There should be an operator before the C<"(">, as there's
5734no indication as to how the digits are to be combined
5735with the characters in the Lao and Thai scripts.
5736
0876b9a0
KW
5737=item Unicode non-character U+%X is illegal for open interchange
5738
4c2e59a0 5739(S nonchar) Certain codepoints, such as U+FFFE and U+FFFF, are
6903afa2
FC
5740defined by the Unicode standard to be non-characters. Those are
5741legal codepoints, but are reserved for internal use; so, applications
5742shouldn't attempt to exchange them. If you know what you are doing
5743you can turn off this warning by C<no warnings 'nonchar';>.
b45f050a 5744
c794c51b
FC
5745=item Unicode surrogate U+%X is illegal in UTF-8
5746
4c2e59a0 5747(S surrogate) You had a UTF-16 surrogate in a context where they are
c794c51b
FC
5748not considered acceptable. These code points, between U+D800 and
5749U+DFFF (inclusive), are used by Unicode only for UTF-16. However, Perl
5750internally allows all unsigned integer code points (up to the size limit
5751available on your platform), including surrogates. But these can cause
5752problems when being input or output, which is likely where this message
5753came from. If you really really know what you are doing you can turn
8457b38f 5754off this warning by C<no warnings 'surrogate';>.
c794c51b 5755
dcfe9e74
KW
5756=item Unknown charname '%s'
5757
5758(F) The name you used inside C<\N{}> is unknown to Perl. Check the
5759spelling. You can say C<use charnames ":loose"> to not have to be
5760so precise about spaces, hyphens, and capitalization on standard Unicode
5761names. (Any custom aliases that have been created must be specified
5762exactly, regardless of whether C<:loose> is used or not.) This error may
5763also happen if the C<\N{}> is not in the scope of the corresponding
5764C<S<use charnames>>.
5765
04177465
FC
5766=item Unknown error
5767
5768(P) Perl was about to print an error message in C<$@>, but the C<$@> variable
5769did not exist, even after an attempt to create it.
5770
6170680b
IZ
5771=item Unknown open() mode '%s'
5772
437784d6 5773(F) The second argument of 3-argument open() is not among the list
c47ff5f1 5774of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>,
488dad83 5775C<< +> >>, C<<< +>> >>>, C<-|>, C<|->, C<< <& >>, C<< >& >>.
6170680b 5776
b4581f09
JH
5777=item Unknown PerlIO layer "%s"
5778
5779(W layer) An attempt was made to push an unknown layer onto the Perl I/O
5780system. (Layers take care of transforming data between external and
5781internal representations.) Note that some layers, such as C<mmap>,
5782are not supported in all environments. If your program didn't
5783explicitly request the failing operation, it may be the result of the
5784value of the environment variable PERLIO.
5785
f675dbe5
CB
5786=item Unknown process %x sent message to prime_env_iter: %s
5787
5788(P) An error peculiar to VMS. Perl was reading values for %ENV before
5789iterating over it, and someone else stuck a message in the stream of
5790data Perl expected. Someone's very confused, or perhaps trying to
5791subvert Perl's population of %ENV for nefarious purposes.
a05d7ebb 5792
0da72d5e
KW
5793=item Unknown regex modifier "%s"
5794
5795(F) Alphanumerics immediately following the closing delimiter
5796of a regular expression pattern are interpreted by Perl as modifier
5797flags for the regex. One of the ones you specified is invalid. One way
5798this can happen is if you didn't put in white space between the end of
5799the regex and a following alphanumeric operator:
5800
5801 if ($a =~ /foo/and $bar == 3) { ... }
5802
5803The C<"a"> is a valid modifier flag, but the C<"n"> is not, and raises
5804this error. Likely what was meant instead was:
5805
5806 if ($a =~ /foo/ and $bar == 3) { ... }
5807
5a25739d
FC
5808=item Unknown "re" subpragma '%s' (known ones are: %s)
5809
5810(W) You tried to use an unknown subpragma of the "re" pragma.
5811
e0e4a6e3
FC
5812=item Unknown switch condition (?(...)) in regex; marked by S<<-- HERE> in
5813m/%s/
96ebfdd7
RK
5814
5815(F) The condition part of a (?(condition)if-clause|else-clause) construct
6903afa2 5816is not known. The condition must be one of the following:
5fecf430 5817
674f6ed9
FC
5818 (1) (2) ... true if 1st, 2nd, etc., capture matched
5819 (<NAME>) ('NAME') true if named capture matched
5820 (?=...) (?<=...) true if subpattern matches
5821 (?!...) (?<!...) true if subpattern fails to match
5822 (?{ CODE }) true if code returns a true value
5823 (R) true if evaluating inside recursion
5824 (R1) (R2) ... true if directly inside capture group 1, 2, etc.
5825 (R&NAME) true if directly inside named capture
5826 (DEFINE) always false; for defining named subpatterns
96ebfdd7 5827
9e3ec65c 5828The <-- HERE shows whereabouts in the regular expression the problem was
96ebfdd7
RK
5829discovered. See L<perlre>.
5830
a05d7ebb
JH
5831=item Unknown Unicode option letter '%c'
5832
a4a4c9e2 5833(F) You specified an unknown Unicode option. See L<perlrun> documentation
a05d7ebb
JH
5834of the C<-C> switch for the list of known options.
5835
64187737 5836=item Unknown Unicode option value %d
a05d7ebb 5837
a4a4c9e2 5838(F) You specified an unknown Unicode option. See L<perlrun> documentation
a05d7ebb 5839of the C<-C> switch for the list of known options.
f675dbe5 5840
e0e4a6e3 5841=item Unknown verb pattern '%s' in regex; marked by S<<-- HERE> in m/%s/
e2e6a0f1
YO
5842
5843(F) You either made a typo or have incorrectly put a C<*> quantifier
5844after an open brace in your pattern. Check the pattern and review
5845L<perlre> for details on legal verb patterns.
5846
c2771421
FC
5847=item Unknown warnings category '%s'
5848
6903afa2 5849(F) An error issued by the C<warnings> pragma. You specified a warnings
c2771421
FC
5850category that is unknown to perl at this point.
5851
14ef4c80
FC
5852Note that if you want to enable a warnings category registered by a
5853module (e.g. C<use warnings 'File::Find'>), you must have loaded this
5854module first.
c2771421 5855
e0e4a6e3 5856=item Unmatched '[' in POSIX class in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
5857
5858(F) You had something like this:
5859
5860 (?[ [:digit: ])
5861
5862That should be written:
5863
5864 (?[ [:digit:] ])
5865
e0e4a6e3
FC
5866=item Unmatched '%c' in POSIX class in regex; marked by S<<-- HERE> in
5867m/%s/
0d0b4b3b 5868
675fa9ff 5869(F) You had something like this:
0d0b4b3b
KW
5870
5871 (?[ [:alnum] ])
5872
5873There should be a second C<":">, like this:
5874
5875 (?[ [:alnum:] ])
5876
e0e4a6e3 5877=item Unmatched [ in regex; marked by S<<-- HERE> in m/%s/
6df41af2 5878
6903afa2 5879(F) The brackets around a character class must match. If you wish to
be771a83 5880include a closing bracket in a character class, backslash it or put it
e0e4a6e3 5881first. The S<<-- HERE> shows whereabouts in the regular expression the
6903afa2 5882problem was discovered. See L<perlre>.
6df41af2 5883
e0e4a6e3 5884=item Unmatched ( in regex; marked by S<<-- HERE> in m/%s/
aec0ef10 5885
e0e4a6e3 5886=item Unmatched ) in regex; marked by S<<-- HERE> in m/%s/
a0d0e21e
LW
5887
5888(F) Unbackslashed parentheses must always be balanced in regular
6903afa2 5889expressions. If you're a vi user, the % key is valuable for finding
e0e4a6e3 5890the matching parenthesis. The S<<-- HERE> shows whereabouts in the
9e3ec65c 5891regular expression the problem was discovered. See L<perlre>.
a0d0e21e 5892
d98d5fff 5893=item Unmatched right %s bracket
a0d0e21e 5894
be771a83
GS
5895(F) The lexer counted more closing curly or square brackets than opening
5896ones, so you're probably missing a matching opening bracket. As a
5897general rule, you'll find the missing one (so to speak) near the place
5898you were last editing.
a0d0e21e 5899
a0d0e21e
LW
5900=item Unquoted string "%s" may clash with future reserved word
5901
be771a83
GS
5902(W reserved) You used a bareword that might someday be claimed as a
5903reserved word. It's best to put such a word in quotes, or capitalize it
5904somehow, or insert an underbar into it. You might also declare it as a
5905subroutine.
a0d0e21e 5906
e0e4a6e3
FC
5907=item Unrecognized character %s; marked by S<<-- HERE> after %s near column
5908%d
a0d0e21e 5909
54310121 5910(F) The Perl parser has no idea what to do with the specified character
1b303a7d
FC
5911in your Perl script (or eval) near the specified column. Perhaps you
5912tried to run a compressed script, a binary program, or a directory as
5913a Perl program.
a0d0e21e 5914
e0e4a6e3
FC
5915=item Unrecognized escape \%c in character class in regex; marked by
5916S<<-- HERE> in m/%s/
0d0b4b3b 5917
675fa9ff
FC
5918(F) You used a backslash-character combination which is not
5919recognized by Perl inside character classes. This is a fatal
5920error when the character class is used within C<(?[ ])>.
0d0b4b3b 5921
6fbc9859 5922=item Unrecognized escape \%c in character class passed through in regex;
e0e4a6e3 5923marked by S<<-- HERE> in m/%s/
6df41af2 5924
be771a83
GS
5925(W regexp) You used a backslash-character combination which is not
5926recognized by Perl inside character classes. The character was
b224edc1 5927understood literally, but this may change in a future version of Perl.
e0e4a6e3 5928The S<<-- HERE> shows whereabouts in the regular expression the
2628b4e0 5929escape was discovered.
6df41af2 5930
4a68bf9d 5931=item Unrecognized escape \%c passed through
2f7da168 5932
2628b4e0 5933(W misc) You used a backslash-character combination which is not
b224edc1
KW
5934recognized by Perl. The character was understood literally, but this may
5935change in a future version of Perl.
2f7da168 5936
e0e4a6e3
FC
5937=item Unrecognized escape \%s passed through in regex; marked by
5938S<<-- HERE> in m/%s/
6df41af2 5939
be771a83 5940(W regexp) You used a backslash-character combination which is not
b7e4ecc1 5941recognized by Perl. The character(s) were understood literally, but
e0e4a6e3 5942this may change in a future version of Perl. The S<<-- HERE> shows
9e3ec65c 5943whereabouts in the regular expression the escape was discovered.
6df41af2 5944
a0d0e21e
LW
5945=item Unrecognized signal name "%s"
5946
be771a83
GS
5947(F) You specified a signal name to the kill() function that was not
5948recognized. Say C<kill -l> in your shell to see the valid signal names
5949on your system.
a0d0e21e 5950
90248788 5951=item Unrecognized switch: -%s (-h will show valid options)
a0d0e21e 5952
be771a83
GS
5953(F) You specified an illegal option to Perl. Don't do that. (If you
5954think you didn't do that, check the #! line to see if it's supplying the
5955bad switch on your behalf.)
a0d0e21e 5956
0953b66b
FC
5957=item unshift on reference is experimental
5958
0773cb3e
FC
5959(S experimental::autoderef) C<unshift> with a scalar argument
5960is experimental and may change or be removed in a future
5961Perl version. If you want to take the risk of using this
5962feature, simply disable this warning:
0953b66b 5963
d401967c 5964 no warnings "experimental::autoderef";
0953b66b 5965
a0d0e21e
LW
5966=item Unsuccessful %s on filename containing newline
5967
be771a83
GS
5968(W newline) A file operation was attempted on a filename, and that
5969operation failed, PROBABLY because the filename contained a newline,
5b3eff12 5970PROBABLY because you forgot to chomp() it off. See L<perlfunc/chomp>.
a0d0e21e
LW
5971
5972=item Unsupported directory function "%s" called
5973
5974(F) Your machine doesn't support opendir() and readdir().
5975
6df41af2
GS
5976=item Unsupported function %s
5977
5978(F) This machine doesn't implement the indicated function, apparently.
5979At least, Configure doesn't think so.
5980
54310121 5981=item Unsupported function fork
5982
5983(F) Your version of executable does not support forking.
5984
be771a83 5985Note that under some systems, like OS/2, there may be different flavors
6903afa2 5986of Perl executables, some of which may support fork, some not. Try
be771a83 5987changing the name you call Perl by to C<perl_>, C<perl__>, and so on.
54310121 5988
7aa207d6 5989=item Unsupported script encoding %s
b250498f
GS
5990
5991(F) Your program file begins with a Unicode Byte Order Mark (BOM) which
7aa207d6 5992declares it to be in a Unicode encoding that Perl cannot read.
b250498f 5993
a0d0e21e
LW
5994=item Unsupported socket function "%s" called
5995
5996(F) Your machine doesn't support the Berkeley socket mechanism, or at
5997least that's what Configure thought.
5998
6df41af2 5999=item Unterminated attribute list
a0d0e21e 6000
be771a83
GS
6001(F) The lexer found something other than a simple identifier at the
6002start of an attribute, and it wasn't a semicolon or the start of a
6003block. Perhaps you terminated the parameter list of the previous
6004attribute too soon. See L<attributes>.
a0d0e21e 6005
09bef843
SB
6006=item Unterminated attribute parameter in attribute list
6007
be771a83
GS
6008(F) The lexer saw an opening (left) parenthesis character while parsing
6009an attribute list, but the matching closing (right) parenthesis
09bef843
SB
6010character was not found. You may need to add (or remove) a backslash
6011character to get your parentheses to balance. See L<attributes>.
6012
f1991046
GS
6013=item Unterminated compressed integer
6014
6015(F) An argument to unpack("w",...) was incompatible with the BER
6016compressed integer format and could not be converted to an integer.
6017See L<perlfunc/pack>.
6018
6f2d7fc9
FC
6019=item Unterminated delimiter for here document
6020
6021(F) This message occurs when a here document label has an initial
6022quotation mark but the final quotation mark is missing. Perhaps
6023you wrote:
6024
6025 <<"foo
6026
6027instead of:
6028
6029 <<"foo"
6030
e0e4a6e3 6031=item Unterminated \g... pattern in regex; marked by S<<-- HERE> in m/%s/
779fedd7 6032
e0e4a6e3 6033=item Unterminated \g{...} pattern in regex; marked by S<<-- HERE> in m/%s/
2bf803e2 6034
5364049c
KW
6035(F) In a regular expression, you had a C<\g> that wasn't followed by a
6036proper group reference. In the case of C<\g{>, the closing brace is
6037missing; otherwise the C<\g> must be followed by an integer. Fix the
6038pattern and retry.
e2e6a0f1 6039
6df41af2 6040=item Unterminated <> operator
09bef843 6041
6df41af2 6042(F) The lexer saw a left angle bracket in a place where it was expecting
be771a83
GS
6043a term, so it's looking for the corresponding right angle bracket, and
6044not finding it. Chances are you left some needed parentheses out
6045earlier in the line, and you really meant a "less than".
09bef843 6046
e0e4a6e3
FC
6047=item Unterminated verb pattern argument in regex; marked by S<<-- HERE> in
6048m/%s/
905fe053
FC
6049
6050(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
6903afa2 6051the pattern with a C<)>. Fix the pattern and retry.
905fe053 6052
e0e4a6e3 6053=item Unterminated verb pattern in regex; marked by S<<-- HERE> in m/%s/
905fe053
FC
6054
6055(F) You used a pattern of the form C<(*VERB)> but did not terminate
6903afa2 6056the pattern with a C<)>. Fix the pattern and retry.
905fe053 6057
6df41af2 6058=item untie attempted while %d inner references still exist
a0d0e21e 6059
be771a83
GS
6060(W untie) A copy of the object returned from C<tie> (or C<tied>) was
6061still valid when C<untie> was called.
a0d0e21e 6062
8e11cd2b
JC
6063=item Usage: POSIX::%s(%s)
6064
6065(F) You called a POSIX function with incorrect arguments.
6066See L<POSIX/FUNCTIONS> for more information.
6067
6068=item Usage: Win32::%s(%s)
6069
6070(F) You called a Win32 function with incorrect arguments.
6071See L<Win32> for more information.
6072
89474f50
FC
6073=item $[ used in %s (did you mean $] ?)
6074
6075(W syntax) You used C<$[> in a comparison, such as:
6076
6077 if ($[ > 5.006) {
6078 ...
6079 }
6080
6081You probably meant to use C<$]> instead. C<$[> is the base for indexing
6082arrays. C<$]> is the Perl version number in decimal.
6083
6da34ecb
FC
6084=item Use "%s" instead of "%s"
6085
6086(F) The second listed construct is no longer legal. Use the first one
6087instead.
6088
8fe85e3f
FC
6089=item Useless assignment to a temporary
6090
6091(W misc) You assigned to an lvalue subroutine, but what
6092the subroutine returned was a temporary scalar about to
6093be discarded, so the assignment had no effect.
6094
e0e4a6e3
FC
6095=item Useless (?-%s) - don't use /%s modifier in regex; marked by
6096S<<-- HERE> in m/%s/
9d1d55b5 6097
96ebfdd7
RK
6098(W regexp) You have used an internal modifier such as (?-o) that has no
6099meaning unless removed from the entire regexp:
9d1d55b5 6100
96ebfdd7 6101 if ($string =~ /(?-o)$pattern/o) { ... }
9d1d55b5
JP
6102
6103must be written as
6104
96ebfdd7 6105 if ($string =~ /$pattern/) { ... }
9d1d55b5 6106
9e3ec65c
FC
6107The <-- HERE shows whereabouts in the regular expression the problem was
6108discovered. See L<perlre>.
9d1d55b5 6109
b4581f09
JH
6110=item Useless localization of %s
6111
6903afa2
FC
6112(W syntax) The localization of lvalues such as C<local($x=10)> is legal,
6113but in fact the local() currently has no effect. This may change at
b4581f09
JH
6114some point in the future, but in the meantime such code is discouraged.
6115
e0e4a6e3
FC
6116=item Useless (?%s) - use /%s modifier in regex; marked by S<<-- HERE> in
6117m/%s/
9d1d55b5 6118
96ebfdd7
RK
6119(W regexp) You have used an internal modifier such as (?o) that has no
6120meaning unless applied to the entire regexp:
9d1d55b5 6121
96ebfdd7 6122 if ($string =~ /(?o)$pattern/) { ... }
9d1d55b5
JP
6123
6124must be written as
6125
96ebfdd7 6126 if ($string =~ /$pattern/o) { ... }
9d1d55b5 6127
9e3ec65c
FC
6128The <-- HERE shows whereabouts in the regular expression the problem was
6129discovered. See L<perlre>.
9d1d55b5 6130
b08e453b
RB
6131=item Useless use of /d modifier in transliteration operator
6132
6133(W misc) You have used the /d modifier where the searchlist has the
6903afa2 6134same length as the replacelist. See L<perlop> for more information
b08e453b
RB
6135about the /d modifier.
6136
4d68ffa0
KW
6137=item Useless use of '\'; doesn't escape metacharacter '%c'
6138
6139(D deprecated) You wrote a regular expression pattern something like
6140one of these:
6141
6142 m{ \x\{FF\} }x
6143 m{foo\{1,3\}}
6144 qr(foo\(bar\))
6145 s[foo\[a-z\]bar][baz]
6146
6147The interior braces, square brackets, and parentheses are treated as
6148metacharacters even though they are backslashed; instead write:
6149
6150 m{ \x{FF} }x
6151 m{foo{1,3}}
6152 qr(foo(bar))
6153 s[foo[a-z]bar][baz]
6154
6155The backslashes have no effect when a regular expression pattern is
50a39ba4 6156delimited by C<{}>, C<[]>, or C<()>, which ordinarily are
4d68ffa0
KW
6157metacharacters, and the delimiters are also used, paired, within the
6158interior of the pattern. It is planned that a future Perl release will
6159change the meaning of constructs like these so that the backslashes
6160will have an effect, so remove them from your code.
6161
820438b1
FC
6162=item Useless use of \E
6163
6164(W misc) You have a \E in a double-quotish string without a C<\U>,
6165C<\L> or C<\Q> preceding it.
6166
4fa6dd16
KW
6167=item Useless use of greediness modifier '%c' in regex; marked by S<<-- HERE> in m/%s/
6168
6169(W regexp) You specified something like these:
6170
6171 qr/a{3}?/
6172 qr/b{1,1}+/
6173
6174The C<"?"> and C<"+"> don't have any effect, as they modify whether to
6175match more or fewer when there is a choice, and by specifying to match
6176exactly a given numer, there is no room left for a choice.
6177
6df41af2 6178=item Useless use of %s in void context
a0d0e21e 6179
75b44862 6180(W void) You did something without a side effect in a context that does
be771a83
GS
6181nothing with the return value, such as a statement that doesn't return a
6182value from a block, or the left side of a scalar comma operator. Very
6183often this points not to stupidity on your part, but a failure of Perl
6184to parse your program the way you thought it would. For example, you'd
6185get this if you mixed up your C precedence with Python precedence and
6186said
a0d0e21e 6187
6df41af2 6188 $one, $two = 1, 2;
748a9306 6189
6df41af2
GS
6190when you meant to say
6191
6192 ($one, $two) = (1, 2);
6193
6194Another common error is to use ordinary parentheses to construct a list
6195reference when you should be using square or curly brackets, for
6196example, if you say
6197
6198 $array = (1,2);
6199
6200when you should have said
6201
6202 $array = [1,2];
6203
6204The square brackets explicitly turn a list value into a scalar value,
6205while parentheses do not. So when a parenthesized list is evaluated in
6206a scalar context, the comma is treated like C's comma operator, which
6207throws away the left argument, which is not what you want. See
6208L<perlref> for more on this.
6209
65191a1e
BS
6210This warning will not be issued for numerical constants equal to 0 or 1
6211since they are often used in statements like
6212
4358a253 6213 1 while sub_with_side_effects();
65191a1e
BS
6214
6215String constants that would normally evaluate to 0 or 1 are warned
6216about.
6217
e0e4a6e3 6218=item Useless use of (?-p) in regex; marked by S<<-- HERE> in m/%s/
675fa9ff
FC
6219
6220(W regexp) The C<p> modifier cannot be turned off once set. Trying to do
6221so is futile.
6222
6df41af2
GS
6223=item Useless use of "re" pragma
6224
6903afa2 6225(W) You did C<use re;> without any arguments. That isn't very useful.
6df41af2 6226
a801c63c
RGS
6227=item Useless use of sort in scalar context
6228
6229(W void) You used sort in scalar context, as in :
6230
6231 my $x = sort @y;
6232
6233This is not very useful, and perl currently optimizes this away.
6234
de4864e4
JH
6235=item Useless use of %s with no values
6236
f87c3213 6237(W syntax) You used the push() or unshift() function with no arguments
6903afa2
FC
6238apart from the array, like C<push(@x)> or C<unshift(@foo)>. That won't
6239usually have any effect on the array, so is completely useless. It's
de4864e4 6240possible in principle that push(@tied_array) could have some effect
6903afa2 6241if the array is tied to a class which implements a PUSH method. If so,
de4864e4
JH
6242you can write it as C<push(@tied_array,())> to avoid this warning.
6243
6df41af2
GS
6244=item "use" not allowed in expression
6245
be771a83
GS
6246(F) The "use" keyword is recognized and executed at compile time, and
6247returns no useful value. See L<perlmod>.
748a9306 6248
36b2db7e
FC
6249=item Use of assignment to $[ is deprecated
6250
6251(D deprecated) The C<$[> variable (index of the first element in an array)
6903afa2 6252is deprecated. See L<perlvar/"$[">.
36b2db7e 6253
c47ff5f1 6254=item Use of bare << to mean <<"" is deprecated
4633a7c4 6255
8ab8f082 6256(D deprecated) You are now encouraged to use the explicitly quoted
1b303a7d
FC
6257form if you wish to use an empty line as the terminator of the
6258here-document.
83ce3e12 6259
96ebfdd7
RK
6260=item Use of chdir('') or chdir(undef) as chdir() deprecated
6261
6262(D deprecated) chdir() with no arguments is documented to change to
6263$ENV{HOME} or $ENV{LOGDIR}. chdir(undef) and chdir('') share this
6264behavior, but that has been deprecated. In future versions they
6265will simply fail.
6266
6267Be careful to check that what you pass to chdir() is defined and not
6268blank, else you might find yourself in your home directory.
6269
64e578a2
MJD
6270=item Use of /c modifier is meaningless in s///
6271
6272(W regexp) You used the /c modifier in a substitution. The /c
6273modifier is not presently meaningful in substitutions.
6274
4ac733c9
MJD
6275=item Use of /c modifier is meaningless without /g
6276
6277(W regexp) You used the /c modifier with a regex operand, but didn't
6278use the /g modifier. Currently, /c is meaningful only when /g is
6279used. (This may change in the future.)
6280
591f5ca2
FC
6281=item Use of comma-less variable list is deprecated
6282
6283(D deprecated) The values you give to a format should be
6284separated by commas, not just aligned on a line.
6285
675fa9ff
FC
6286=item Use of each() on hash after insertion without resetting hash iterator results in undefined behavior
6287
f26c79ba
FC
6288(S internal) The behavior of C<each()> after insertion is undefined;
6289it may skip items, or visit items more than once. Consider using
6290C<keys()> instead of C<each()>.
675fa9ff 6291
2dc78664 6292=item Use of := for an empty attribute list is not allowed
036e1e65 6293
2dc78664
NC
6294(F) The construction C<my $x := 42> used to parse as equivalent to
6295C<my $x : = 42> (applying an empty attribute list to C<$x>).
6296This construct was deprecated in 5.12.0, and has now been made a syntax
6297error, so C<:=> can be reclaimed as a new operator in the future.
6298
6299If you need an empty attribute list, for example in a code generator, add
6300a space before the C<=>.
036e1e65 6301
b6c83531 6302=item Use of freed value in iteration
2f7da168 6303
b6c83531
JH
6304(F) Perhaps you modified the iterated array within the loop?
6305This error is typically caused by code like the following:
2f7da168
RK
6306
6307 @a = (3,4);
6308 @a = () for (1,2,@a);
6309
6310You are not supposed to modify arrays while they are being iterated over.
6311For speed and efficiency reasons, Perl internally does not do full
6312reference-counting of iterated items, hence deleting such an item in the
6313middle of an iteration causes Perl to see a freed value.
6314
39b99f21 6315=item Use of *glob{FILEHANDLE} is deprecated
6316
6317(D deprecated) You are now encouraged to use the shorter *glob{IO} form
6318to access the filehandle slot within a typeglob.
6319
96ebfdd7 6320=item Use of /g modifier is meaningless in split
35ae6b54 6321
96ebfdd7
RK
6322(W regexp) You used the /g modifier on the pattern for a C<split>
6323operator. Since C<split> always tries to match the pattern
6324repeatedly, the C</g> has no effect.
35ae6b54 6325
0b98bec9
RGS
6326=item Use of "goto" to jump into a construct is deprecated
6327
6328(D deprecated) Using C<goto> to jump from an outer scope into an inner
6329scope is deprecated and should be avoided.
6330
dc848c6f 6331=item Use of inherited AUTOLOAD for non-method %s() is deprecated
6332
1da25648
FC
6333(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD>
6334subroutines are looked up as methods (using the C<@ISA> hierarchy)
6335even when the subroutines to be autoloaded were called as plain
6336functions (e.g. C<Foo::bar()>), not as methods (e.g. C<< Foo->bar() >> or
6337C<< $obj->bar() >>).
dc848c6f 6338
be771a83
GS
6339This bug will be rectified in future by using method lookup only for
6340methods' C<AUTOLOAD>s. However, there is a significant base of existing
6341code that may be using the old behavior. So, as an interim step, Perl
6342currently issues an optional warning when non-methods use inherited
6343C<AUTOLOAD>s.
dc848c6f 6344
6345The simple rule is: Inheritance will not work when autoloading
be771a83
GS
6346non-methods. The simple fix for old code is: In any module that used
6347to depend on inheriting C<AUTOLOAD> for non-methods from a base class
6348named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during
6349startup.
dc848c6f 6350
be771a83
GS
6351In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
6352you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
7b8d334a 6353C<use AutoLoader 'AUTOLOAD';>.
a23209c7 6354
6df41af2
GS
6355=item Use of %s in printf format not supported
6356
6357(F) You attempted to use a feature of printf that is accessible from
6358only C. This usually means there's a better way to do it in Perl.
6359
6df41af2
GS
6360=item Use of %s is deprecated
6361
75b44862 6362(D deprecated) The construct indicated is no longer recommended for use,
be771a83
GS
6363generally because there's a better way to do it, and also because the
6364old way has bad side effects.
6df41af2 6365
591f5ca2
FC
6366=item Use of literal control characters in variable names is deprecated
6367
6368(D deprecated) Using literal control characters in the source to refer
6369to the ^FOO variables, like C<$^X> and C<${^GLOBAL_PHASE}> is now
6370deprecated. This only affects code like C<$\cT>, where \cT is a control in
6371the source code: C<${"\cT"}> and C<$^T> remain valid.
6372
5840701a 6373=item Use of -l on filehandle%s
5a7abfcc
FC
6374
6375(W io) A filehandle represents an opened file, and when you opened the file
6376it already went past any symlink you are presumably trying to look for.
6377The operation returned C<undef>. Use a filename instead.
6378
4055dbce
RS
6379=item Use of my $_ is experimental
6380
6381(S experimental::lexical_topic) Lexical $_ is an experimental feature and
6382its behavior may change or even be removed in any future release of perl.
6383See the explanation under L<perlvar/$_>.
6384
7c7df812
FC
6385=item Use of %s on a handle without * is deprecated
6386
22d6fc57 6387(D deprecated) You used C<tie>, C<tied> or C<untie> on a scalar but that scalar
fa816bf3 6388happens to hold a typeglob, which means its filehandle will be tied. If
22d6fc57
FC
6389you mean to tie a handle, use an explicit * as in C<tie *$handle>.
6390
6391This was a long-standing bug that was removed in Perl 5.16, as there was
6392no way to tie the scalar itself when it held a typeglob, and no way to
6393untie a scalar that had had a typeglob assigned to it. If you see this
6394message, you must be using an older version.
7c7df812 6395
905fe053
FC
6396=item Use of ?PATTERN? without explicit operator is deprecated
6397
6398(D deprecated) You have written something like C<?\w?>, for a regular
6399expression that matches only once. Starting this term directly with
6400the question mark delimiter is now deprecated, so that the question mark
6401will be available for use in new operators in the future. Write C<m?\w?>
6402instead, explicitly using the C<m> operator: the question mark delimiter
6403still invokes match-once behaviour.
6404
1f1cc344 6405=item Use of reference "%s" as array index
d804643f 6406
77b96956 6407(W misc) You tried to use a reference as an array index; this probably
1f1cc344
JH
6408isn't what you mean, because references in numerical context tend
6409to be huge numbers, and so usually indicates programmer error.
d804643f 6410
64977eb6 6411If you really do mean it, explicitly numify your reference, like so:
1f1cc344 6412C<$array[0+$ref]>. This warning is not given for overloaded objects,
54e0f05c 6413however, because you can overload the numification and stringification
c69ca1d4 6414operators and then you presumably know what you are doing.
d804643f 6415
4055dbce
RS
6416=item Use of state $_ is experimental
6417
6418(S experimental::lexical_topic) Lexical $_ is an experimental feature and
6419its behavior may change or even be removed in any future release of perl.
6420See the explanation under L<perlvar/$_>.
6421
bbd7eb8a
RD
6422=item Use of tainted arguments in %s is deprecated
6423
159f47d9 6424(W taint, deprecated) You have supplied C<system()> or C<exec()> with multiple
bbd7eb8a
RD
6425arguments and at least one of them is tainted. This used to be allowed
6426but will become a fatal error in a future version of perl. Untaint your
6427arguments. See L<perlsec>.
6428
cc95b072 6429=item Use of uninitialized value%s
a0d0e21e 6430
be771a83
GS
6431(W uninitialized) An undefined value was used as if it were already
6432defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
6433To suppress this warning assign a defined value to your variables.
a0d0e21e 6434
6903afa2
FC
6435To help you figure out what was undefined, perl will try to tell you
6436the name of the variable (if any) that was undefined. In some cases
6437it cannot do this, so it also tells you what operation you used the
6438undefined value in. Note, however, that perl optimizes your program
50a39ba4 6439and the operation displayed in the warning may not necessarily appear
6903afa2
FC
6440literally in your program. For example, C<"that $foo"> is usually
6441optimized into C<"that " . $foo>, and the warning will refer to the
6442C<concatenation (.)> operator, even though there is no C<.> in
6443your program.
e5be4a53 6444
e0e4a6e3
FC
6445=item Use \x{...} for more than two hex characters in regex; marked by
6446S<<-- HERE> in m/%s/
675fa9ff
FC
6447
6448(F) In a regular expression, you said something like
6449
6450 (?[ [ \xBEEF ] ])
6451
6452Perl isn't sure if you meant this
6453
6454 (?[ [ \x{BEEF} ] ])
6455
6456or if you meant this
6457
6458 (?[ [ \x{BE} E F ] ])
6459
6460You need to add either braces or blanks to disambiguate.
6461
a1063b2d
RH
6462=item Using a hash as a reference is deprecated
6463
496a33f5 6464(D deprecated) You tried to use a hash as a reference, as in
1b1f1335 6465C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl <= 5.6.1
6903afa2
FC
6466used to allow this syntax, but shouldn't have. It is now
6467deprecated, and will be removed in a future version.
a1063b2d
RH
6468
6469=item Using an array as a reference is deprecated
6470
496a33f5 6471(D deprecated) You tried to use an array as a reference, as in
1b1f1335 6472C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl <= 5.6.1 used to
6903afa2
FC
6473allow this syntax, but shouldn't have. It is now deprecated,
6474and will be removed in a future version.
a1063b2d 6475
6fbc9859 6476=item Using just the first character returned by \N{} in character class in
e0e4a6e3 6477regex; marked by S<<-- HERE> in m/%s/
ff3f963a 6478
687531b5
FC
6479(W regexp) A charnames handler may return a sequence of more than one
6480character. Currently all but the first one are discarded when used in
6481a regular expression pattern bracketed character class.
ff3f963a 6482
c794c51b
FC
6483=item Using !~ with %s doesn't make sense
6484
6485(F) Using the C<!~> operator with C<s///r>, C<tr///r> or C<y///r> is
6486currently reserved for future use, as the exact behaviour has not
6903afa2 6487been decided. (Simply returning the boolean opposite of the
c794c51b 6488modified string is usually not particularly useful.)
0876b9a0 6489
949cf498
KW
6490=item UTF-16 surrogate U+%X
6491
4c2e59a0 6492(S surrogate) You had a UTF-16 surrogate in a context where they are
949cf498
KW
6493not considered acceptable. These code points, between U+D800 and
6494U+DFFF (inclusive), are used by Unicode only for UTF-16. However, Perl
6495internally allows all unsigned integer code points (up to the size limit
6496available on your platform), including surrogates. But these can cause
6497problems when being input or output, which is likely where this message
6498came from. If you really really know what you are doing you can turn
8457b38f 6499off this warning by C<no warnings 'surrogate';>.
9466bab6 6500
68dc0745 6501=item Value of %s can be "0"; test with defined()
a6006777 6502
75b44862 6503(W misc) In a conditional expression, you used <HANDLE>, <*> (glob),
be771a83
GS
6504C<each()>, or C<readdir()> as a boolean value. Each of these constructs
6505can return a value of "0"; that would make the conditional expression
6506false, which is probably not what you intended. When using these
6507constructs in conditional expressions, test their values with the
6508C<defined> operator.
a6006777 6509
f675dbe5
CB
6510=item Value of CLI symbol "%s" too long
6511
be771a83
GS
6512(W misc) A warning peculiar to VMS. Perl tried to read the value of an
6513%ENV element from a CLI symbol table, and found a resultant string
6514longer than 1024 characters. The return value has been truncated to
65151024 characters.
f675dbe5 6516
0953b66b
FC
6517=item values on reference is experimental
6518
0773cb3e
FC
6519(S experimental::autoderef) C<values> with a scalar argument
6520is experimental and may change or be removed in a future
6521Perl version. If you want to take the risk of using this
6522feature, simply disable this warning:
0953b66b 6523
d401967c 6524 no warnings "experimental::autoderef";
0953b66b 6525
b5c19bd7 6526=item Variable "%s" is not available
44a8e56a 6527
b5c19bd7
DM
6528(W closure) During compilation, an inner named subroutine or eval is
6529attempting to capture an outer lexical that is not currently available.
6903afa2 6530This can happen for one of two reasons. First, the outer lexical may be
b5c19bd7
DM
6531declared in an outer anonymous subroutine that has not yet been created.
6532(Remember that named subs are created at compile time, while anonymous
6903afa2 6533subs are created at run-time.) For example,
44a8e56a 6534
b5c19bd7 6535 sub { my $a; sub f { $a } }
44a8e56a 6536
b5c19bd7 6537At the time that f is created, it can't capture the current value of $a,
6903afa2 6538since the anonymous subroutine hasn't been created yet. Conversely,
b5c19bd7
DM
6539the following won't give a warning since the anonymous subroutine has by
6540now been created and is live:
be771a83 6541
b5c19bd7
DM
6542 sub { my $a; eval 'sub f { $a }' }->();
6543
6544The second situation is caused by an eval accessing a variable that has
6545gone out of scope, for example,
6546
6547 sub f {
6548 my $a;
6549 sub { eval '$a' }
6550 }
6551 f()->();
6552
1b303a7d
FC
6553Here, when the '$a' in the eval is being compiled, f() is not currently
6554being executed, so its $a is not available for capture.
44a8e56a 6555
b4581f09
JH
6556=item Variable "%s" is not imported%s
6557
120b0f81 6558(S misc) With "use strict" in effect, you referred to a global variable
413ff9f6 6559that you apparently thought was imported from another module, because
b4581f09
JH
6560something else of the same name (usually a subroutine) is exported by
6561that module. It usually means you put the wrong funny character on the
6562front of your variable.
6563
aec0ef10 6564=item Variable length lookbehind not implemented in regex m/%s/
b4581f09
JH
6565
6566(F) Lookbehind is allowed only for subexpressions whose length is fixed and
58e23c8d 6567known at compile time. See L<perlre>.
b4581f09
JH
6568
6569=item "%s" variable %s masks earlier declaration in same %s
6570
b9cc85ad
FC
6571(W misc) A "my", "our" or "state" variable has been redeclared in the
6572current scope or statement, effectively eliminating all access to the
6573previous instance. This is almost always a typographical error. Note
6574that the earlier variable will still exist until the end of the scope
20d33786 6575or until all closure references to it are destroyed.
b4581f09 6576
6df41af2
GS
6577=item Variable syntax
6578
6579(A) You've accidentally run your script through B<csh> instead
6580of Perl. Check the #! line, or manually feed your script into
6581Perl yourself.
6582
44a8e56a 6583=item Variable "%s" will not stay shared
6584
be771a83 6585(W closure) An inner (nested) I<named> subroutine is referencing a
b5c19bd7 6586lexical variable defined in an outer named subroutine.
44a8e56a 6587
b5c19bd7 6588When the inner subroutine is called, it will see the value of
be771a83
GS
6589the outer subroutine's variable as it was before and during the *first*
6590call to the outer subroutine; in this case, after the first call to the
6591outer subroutine is complete, the inner and outer subroutines will no
6592longer share a common value for the variable. In other words, the
6593variable will no longer be shared.
44a8e56a 6594
44a8e56a 6595This problem can usually be solved by making the inner subroutine
6596anonymous, using the C<sub {}> syntax. When inner anonymous subs that
b5c19bd7 6597reference variables in outer subroutines are created, they
be771a83 6598are automatically rebound to the current values of such variables.
44a8e56a 6599
6651ba0b
FC
6600=item vector argument not supported with alpha versions
6601
8b6051f1 6602(S printf) The %vd (s)printf format does not support version objects
6651ba0b
FC
6603with alpha parts.
6604
e0e4a6e3
FC
6605=item Verb pattern '%s' has a mandatory argument in regex; marked by
6606S<<-- HERE> in m/%s/
e2e6a0f1 6607
6903afa2
FC
6608(F) You used a verb pattern that requires an argument. Supply an
6609argument or check that you are using the right verb.
e2e6a0f1 6610
e0e4a6e3
FC
6611=item Verb pattern '%s' may not have an argument in regex; marked by
6612S<<-- HERE> in m/%s/
e2e6a0f1 6613
6903afa2 6614(F) You used a verb pattern that is not allowed an argument. Remove the
e2e6a0f1
YO
6615argument or check that you are using the right verb.
6616
084610c0
GS
6617=item Version number must be a constant number
6618
6619(P) The attempt to translate a C<use Module n.n LIST> statement into
6620its equivalent C<BEGIN> block found an internal inconsistency with
6621the version number.
6622
808ee47e
SP
6623=item Version string '%s' contains invalid data; ignoring: '%s'
6624
32e998fd
RGS
6625(W misc) The version string contains invalid characters at the end, which
6626are being ignored.
808ee47e 6627
7e1af8bc 6628=item Warning: something's wrong
5f05dabc 6629
6630(W) You passed warn() an empty string (the equivalent of C<warn "">) or
ec8bb14c 6631you called it with no args and C<$@> was empty.
5f05dabc 6632
f86702cc 6633=item Warning: unable to close filehandle %s properly
a0d0e21e 6634
be771a83
GS
6635(S) The implicit close() done by an open() got an error indication on
6636the close(). This usually indicates your file system ran out of disk
6637space.
a0d0e21e 6638
5f05dabc 6639=item Warning: Use of "%s" without parentheses is ambiguous
a0d0e21e 6640
be771a83
GS
6641(S ambiguous) You wrote a unary operator followed by something that
6642looks like a binary operator that could also have been interpreted as a
6643term or unary operator. For instance, if you know that the rand
6644function has a default argument of 1.0, and you write
a0d0e21e
LW
6645
6646 rand + 5;
6647
6648you may THINK you wrote the same thing as
6649
6650 rand() + 5;
6651
6652but in actual fact, you got
6653
6654 rand(+5);
6655
5f05dabc 6656So put in parentheses to say what you really mean.
a0d0e21e 6657
0f539b13
BF
6658=item when is experimental
6659
6660(S experimental::smartmatch) C<when> depends on smartmatch, which is
6661experimental. Additionally, it has several special cases that may
6662not be immediately obvious, and their behavior may change or
675fa9ff
FC
6663even be removed in any future release of perl. See the explanation
6664under L<perlsyn/Experimental Details on given and when>.
0f539b13 6665
4b3603a4
JH
6666=item Wide character in %s
6667
c8f79457 6668(S utf8) Perl met a wide character (>255) when it wasn't expecting
cd28123a
JH
6669one. This warning is by default on for I/O (like print). The easiest
6670way to quiet this warning is simply to add the C<:utf8> layer to the
6671output, e.g. C<binmode STDOUT, ':utf8'>. Another way to turn off the
6672warning is to add C<no warnings 'utf8';> but that is often closer to
6673cheating. In general, you are supposed to explicitly mark the
6674filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
4b3603a4 6675
49704364
WL
6676=item Within []-length '%c' not allowed
6677
fa816bf3
FC
6678(F) The count in the (un)pack template may be replaced by C<[TEMPLATE]>
6679only if C<TEMPLATE> always matches the same amount of packed bytes that
6680can be determined from the template alone. This is not possible if
6681it contains any of the codes @, /, U, u, w or a *-length. Redesign
6682the template.
49704364 6683
9a7dcd9c 6684=item write() on closed filehandle %s
a0d0e21e 6685
be771a83 6686(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 6687before now. Check your control flow.
a0d0e21e 6688
9ae3ac1a 6689=item %s "\x%X" does not map to Unicode
b4581f09 6690
27f95370
FC
6691(S utf8) When reading in different encodings, Perl tries to
6692map everything into Unicode characters. The bytes you read
6693in are not legal in this encoding. For example
b4581f09
JH
6694
6695 utf8 "\xE4" does not map to Unicode
6696
6697if you try to read in the a-diaereses Latin-1 as UTF-8.
6698
49704364 6699=item 'X' outside of string
a0d0e21e 6700
49704364
WL
6701(F) You had a (un)pack template that specified a relative position before
6702the beginning of the string being (un)packed. See L<perlfunc/pack>.
a0d0e21e 6703
49704364 6704=item 'x' outside of string in unpack
a0d0e21e
LW
6705
6706(F) You had a pack template that specified a relative position after
6707the end of the string being unpacked. See L<perlfunc/pack>.
6708
a0d0e21e
LW
6709=item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
6710
5f05dabc 6711(F) And you probably never will, because you probably don't have the
a0d0e21e 6712sources to your kernel, and your vendor probably doesn't give a rip
1b1f1335 6713about what you want. Your best bet is to put a setuid C wrapper around
496a33f5 6714your script.
a0d0e21e
LW
6715
6716=item You need to quote "%s"
6717
be771a83
GS
6718(W syntax) You assigned a bareword as a signal handler name.
6719Unfortunately, you already have a subroutine of that name declared,
6720which means that Perl 5 will try to call the subroutine when the
6721assignment is executed, which is probably not what you want. (If it IS
6722what you want, put an & in front.)
a0d0e21e 6723
6cfd5ea7
JH
6724=item Your random numbers are not that random
6725
50a39ba4 6726(F) When trying to initialize the random seed for hashes, Perl could
6cfd5ea7
JH
6727not get any randomness out of your system. This usually indicates
6728Something Very Wrong.
6729
e0e4a6e3 6730=item Zero length \N{} in regex; marked by S<<-- HERE> in m/%s/
8a5a438d
FC
6731
6732(F) Named Unicode character escapes C<(\N{...})> may return a zero-length
6733sequence. Such an escape was used in an extended character class, i.e.
6734C<(?[...])>, which is not permitted. Check that the correct escape has
e0e4a6e3 6735been used, and the correct charnames handler is in scope. The S<<-- HERE>
8a5a438d
FC
6736shows whereabouts in the regular expression the problem was discovered.
6737
a0d0e21e
LW
6738=back
6739
00eb3f2b
RGS
6740=head1 SEE ALSO
6741
ed3f9c4f 6742L<warnings>, L<perllexwarn>, L<diagnostics>.
00eb3f2b 6743
56e90b21 6744=cut