-
Notifications
You must be signed in to change notification settings - Fork 527
/
perldiag.pod
8255 lines (5642 loc) · 307 KB
/
perldiag.pod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=head1 NAME
perldiag - various Perl diagnostics
=head1 DESCRIPTION
These messages are classified as follows (listed in increasing order of
desperation):
(W) A warning (optional).
(D) A deprecation (enabled by default).
(S) A severe warning (enabled by default).
(F) A fatal error (trappable).
(P) An internal error you should never see (trappable).
(X) A very fatal error (nontrappable).
(A) An alien error message (not generated by Perl).
The majority of messages from the first three classifications above
(W, D & S) can be controlled using the C<warnings> pragma.
If a message can be controlled by the C<warnings> pragma, its warning
category is included with the classification letter in the description
below. E.g. C<(W closed)> means a warning in the C<closed> category.
Optional warnings are enabled by using the C<warnings> pragma or the B<-w>
and B<-W> switches. Warnings may be captured by setting C<$SIG{__WARN__}>
to a reference to a routine that will be called on each warning instead
of printing it. See L<perlvar>.
Severe warnings are always enabled, unless they are explicitly disabled
with the C<warnings> pragma or the B<-X> switch.
Trappable errors may be trapped using the eval operator. See
L<perlfunc/eval>. In almost all cases, warnings may be selectively
disabled or promoted to fatal errors using the C<warnings> pragma.
See L<warnings>.
The messages are in alphabetical order, without regard to upper or
lower-case. Some of these messages are generic. Spots that vary are
denoted with a %s or other printf-style escape. These escapes are
ignored by the alphabetical order, as are all characters other than
letters. To look up your message, just ignore anything that is not a
letter.
=over 4
=item accept() on closed socket %s
(W closed) You tried to do an accept on a closed socket. Did you forget
to check the return value of your socket() call? See
L<perlfunc/accept>.
=item ADJUST is experimental
(S experimental::class) This warning is emitted if you use the C<ADJUST>
keyword of C<use feature 'class'>. This keyword is currently
experimental and its behaviour may change in future releases of Perl.
=item Aliasing via reference is experimental
(S experimental::refaliasing) This warning is emitted if you use
a reference constructor on the left-hand side of an assignment to
alias one variable to another. Simply suppress the warning if you
want to use the feature, but know that in doing so you are taking
the risk of using an experimental feature which may change or be
removed in a future Perl version:
no warnings "experimental::refaliasing";
use feature "refaliasing";
\$x = \$y;
=item '%c' allowed only after types %s in %s
(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only
after certain types. See L<perlfunc/pack>.
=item alpha->numify() is lossy
(W numeric) An alpha version can not be numified without losing
information.
=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
(W ambiguous) A subroutine you have declared has the same name as a Perl
keyword, and you have used the name without qualification for calling
one or the other. Perl decided to call the builtin because the
subroutine is not imported.
To force interpretation as a subroutine call, either put an ampersand
before the subroutine name, or qualify the name with its package.
Alternatively, you can import the subroutine (or pretend that it's
imported with the C<use subs> pragma).
To silently interpret it as the Perl operator, use the C<CORE::> prefix
on the operator (e.g. C<CORE::log($x)>) or declare the subroutine
to be an object method (see L<perlsub/"Subroutine Attributes"> or
L<attributes>).
=item Ambiguous range in transliteration operator
(F) You wrote something like C<tr/a-z-0//> which doesn't mean anything at
all. To include a C<-> character in a transliteration, put it either
first or last. (In the past, C<tr/a-z-0//> was synonymous with
C<tr/a-y//>, which was probably not what you would have expected.)
=item Ambiguous use of %s resolved as %s
(S ambiguous) You said something that may not be interpreted the way
you thought. Normally it's pretty easy to disambiguate it by supplying
a missing quote, operator, parenthesis pair or declaration.
=item Ambiguous use of -%s resolved as -&%s()
(S ambiguous) You wrote something like C<-foo>, which might be the
string C<"-foo">, or a call to the function C<foo>, negated. If you meant
the string, just write C<"-foo">. If you meant the function call,
write C<-foo()>.
=item Ambiguous use of %c resolved as operator %c
(S ambiguous) C<%>, C<&>, and C<*> are both infix operators (modulus,
bitwise and, and multiplication) I<and> initial special characters
(denoting hashes, subroutines and typeglobs), and you said something
like C<*foo * foo> that might be interpreted as either of them. We
assumed you meant the infix operator, but please try to make it more
clear -- in the example given, you might write C<*foo * foo()> if you
really meant to multiply a glob by the result of calling a function.
=item Ambiguous use of %c{%s} resolved to %c%s
(W ambiguous) You wrote something like C<@{foo}>, which might be
asking for the variable C<@foo>, or it might be calling a function
named foo, and dereferencing it as an array reference. If you wanted
the variable, you can just write C<@foo>. If you wanted to call the
function, write C<@{foo()}> ... or you could just not have a variable
and a function with the same name, and save yourself a lot of trouble.
=item Ambiguous use of %c{%s[...]} resolved to %c%s[...]
=item Ambiguous use of %c{%s{...}} resolved to %c%s{...}
(W ambiguous) You wrote something like C<${foo[2]}> (where foo represents
the name of a Perl keyword), which might be looking for element number
2 of the array named C<@foo>, in which case please write C<$foo[2]>, or you
might have meant to pass an anonymous arrayref to the function named
foo, and then do a scalar deref on the value it returns. If you meant
that, write C<${foo([2])}>.
In regular expressions, the C<${foo[2]}> syntax is sometimes necessary
to disambiguate between array subscripts and character classes.
C</$length[2345]/>, for instance, will be interpreted as C<$length> followed
by the character class C<[2345]>. If an array subscript is what you
want, you can avoid the warning by changing C</${length[2345]}/> to the
unsightly C</${\$length[2345]}/>, by renaming your array to something
that does not coincide with a built-in keyword, or by simply turning
off warnings with C<no warnings 'ambiguous';>.
=item '|' and '<' may not both be specified on command line
(F) An error peculiar to VMS. Perl does its own command line
redirection, and found that STDIN was a pipe, and that you also tried to
redirect STDIN using '<'. Only one STDIN stream to a customer, please.
=item '|' and '>' may not both be specified on command line
(F) An error peculiar to VMS. Perl does its own command line
redirection, and thinks you tried to redirect stdout both to a file and
into a pipe to another command. You need to choose one or the other,
though nothing's stopping you from piping into a program or Perl script
which 'splits' output into two streams, such as
open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
while (<STDIN>) {
print;
print OUT;
}
close OUT;
=item Applying %s to %s will act on scalar(%s)
(W misc) The pattern match (C<//>), substitution (C<s///>), and
transliteration (C<tr///>) operators work on scalar values. If you apply
one of them to an array or a hash, it will convert the array or hash to
a scalar value (the length of an array, or the population info of a
hash) and then work on that scalar value. This is probably not what
you meant to do. See L<perlfunc/grep> and L<perlfunc/map> for
alternatives.
=item Arg too short for msgsnd
(F) msgsnd() requires a string at least as long as sizeof(long).
=item Argument "%s" isn't numeric%s
(W numeric) The indicated string was fed as an argument to an operator
that expected a numeric value instead. If you're fortunate the message
will identify which operator was so unfortunate.
Note that for the C<Inf> and C<NaN> (infinity and not-a-number) the
definition of "numeric" is somewhat unusual: the strings themselves
(like "Inf") are considered numeric, and anything following them is
considered non-numeric.
=item Argument list not closed for PerlIO layer "%s"
(W layer) When pushing a layer with arguments onto the Perl I/O
system you forgot the ) that closes the argument list. (Layers
take care of transforming data between external and internal
representations.) Perl stopped parsing the layer list at this
point and did not attempt to push this layer. If your program
didn't explicitly request the failing operation, it may be the
result of the value of the environment variable PERLIO.
=item Argument "%s" treated as 0 in increment (++)
(W numeric) The indicated string was fed as an argument to the C<++>
operator which expects either a number or a string matching
C</^[a-zA-Z]*[0-9]*\z/>. See L<perlop/Auto-increment and
Auto-decrement> for details.
=item Array passed to stat will be coerced to a scalar%s
(W syntax) You called stat() on an array, but the array will be
coerced to a scalar - the number of elements in the array.
=item A signature parameter must start with '$', '@' or '%'
(F) Each subroutine signature parameter declaration must start with a valid
sigil; for example:
sub foo ($x, $, $y = 1, @z) {}
=item A slurpy parameter may not have a default value
(F) Only scalar subroutine signature parameters may have a default value;
for example:
sub foo ($x = 1) {} # legal
sub foo (@x = (1)) {} # invalid
sub foo (%x = (a => b)) {} # invalid
=item assertion botched: %s
(X) The malloc package that comes with Perl had an internal failure.
=item Assertion %s failed: file "%s", line %d
(X) A general assertion failed. The file in question must be examined.
=item Assigned value is not a reference
(F) You tried to assign something that was not a reference to an lvalue
reference (e.g., C<\$x = $y>). If you meant to make $x an alias to $y, use
C<\$x = \$y>.
=item Assigned value is not %s reference
(F) You tried to assign a reference to a reference constructor, but the
two references were not of the same type. You cannot alias a scalar to
an array, or an array to a hash; the two types must match.
\$x = \@y; # error
\@x = \%y; # error
$y = [];
\$x = $y; # error; did you mean \$y?
=item Assigning non-zero to $[ is no longer possible
(F) When the "array_base" feature is disabled
(e.g., and under C<use v5.16;>, and as of Perl 5.30)
the special variable C<$[>, which is deprecated, is now a fixed zero value.
=item Assignment to both a list and a scalar
(F) If you assign to a conditional operator, the 2nd and 3rd arguments
must either both be scalars or both be lists. Otherwise Perl won't
know which context to supply to the right side.
=item Assuming NOT a POSIX class since %s in regex; marked by S<<-- HERE> in m/%s/
(W regexp) You had something like these:
[[:alnum]]
[[:digit:xyz]
They look like they might have been meant to be the POSIX classes
C<[:alnum:]> or C<[:digit:]>. If so, they should be written:
[[:alnum:]]
[[:digit:]xyz]
Since these aren't legal POSIX class specifications, but are legal
bracketed character classes, Perl treats them as the latter. In the
first example, it matches the characters C<":">, C<"[">, C<"a">, C<"l">,
C<"m">, C<"n">, and C<"u">.
If these weren't meant to be POSIX classes, this warning message is
spurious, and can be suppressed by reordering things, such as
[[al:num]]
or
[[:munla]]
=item <> at require-statement should be quotes
(F) You wrote C<< require <file> >> when you should have written
C<require 'file'>.
=item Attempt to access disallowed key '%s' in a restricted hash
(F) The failing code has attempted to get or set a key which is not in
the current set of allowed keys of a restricted hash.
=item Attempt to bless into a freed package
(F) You wrote C<bless $foo> with one argument after somehow causing
the current package to be freed. Perl cannot figure out what to
do, so it throws up its hands in despair.
=item Attempt to bless into a class
(F) You are attempting to call C<bless> with a package name that is a
new-style C<class>. This is not necessary, as instances created by the
constructor are already in the correct class. Instances cannot be created
by other means, such as C<bless>.
=item Attempt to bless into a reference
(F) The CLASSNAME argument to the bless() operator is expected to be
the name of the package to bless the resulting object into. You've
supplied instead a reference to something: perhaps you wrote
bless $self, $proto;
when you intended
bless $self, ref($proto) || $proto;
If you actually want to bless into the stringified version
of the reference supplied, you need to stringify it yourself, for
example by:
bless $self, "$proto";
=item Attempt to clear deleted array
(S debugging) An array was assigned to when it was being freed.
Freed values are not supposed to be visible to Perl code. This
can also happen if XS code calls C<av_clear> from a custom magic
callback on the array.
=item Attempt to delete disallowed key '%s' from a restricted hash
(F) The failing code attempted to delete from a restricted hash a key
which is not in its key set.
=item Attempt to delete readonly key '%s' from a restricted hash
(F) The failing code attempted to delete a key whose value has been
declared readonly from a restricted hash.
=item Attempt to free non-arena SV: 0x%x
(S internal) All SV objects are supposed to be allocated from arenas
that will be garbage collected on exit. An SV was discovered to be
outside any of those arenas.
=item Attempt to free nonexistent shared string '%s'%s
(S internal) Perl maintains a reference-counted internal table of
strings to optimize the storage and access of hash keys and other
strings. This indicates someone tried to decrement the reference count
of a string that can no longer be found in the table.
=item Attempt to free temp prematurely: SV 0x%x
(S debugging) Mortalized values are supposed to be freed by the
free_tmps() routine. This indicates that something else is freeing the
SV before the free_tmps() routine gets a chance, which means that the
free_tmps() routine will be freeing an unreferenced scalar when it does
try to free it.
=item Attempt to free unreferenced glob pointers
(S internal) The reference counts got screwed up on symbol aliases.
=item Attempt to free unreferenced scalar: SV 0x%x
(S internal) Perl went to decrement the reference count of a scalar to
see if it would go to 0, and discovered that it had already gone to 0
earlier, and should have been freed, and in fact, probably was freed.
This could indicate that SvREFCNT_dec() was called too many times, or
that SvREFCNT_inc() was called too few times, or that the SV was
mortalized when it shouldn't have been, or that memory has been
corrupted.
=item Attempt to pack pointer to temporary value
(W pack) You tried to pass a temporary value (like the result of a
function, or a computed expression) to the "p" pack() template. This
means the result contains a pointer to a location that could become
invalid anytime, even before the end of the current statement. Use
literals or global values as arguments to the "p" pack() template to
avoid this warning.
=item Attempt to reload %s aborted.
(F) You tried to load a file with C<use> or C<require> that failed to
compile once already. Perl will not try to compile this file again
unless you delete its entry from %INC. See L<perlfunc/require> and
L<perlvar/%INC>.
=item Attempt to set length of freed array
(W misc) You tried to set the length of an array which has
been freed. You can do this by storing a reference to the
scalar representing the last index of an array and later
assigning through that reference. For example
$r = do {my @a; \$#a};
$$r = 503
=item Attempt to use reference as lvalue in substr
(W substr) You supplied a reference as the first argument to substr()
used as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See L<perlfunc/substr>.
=item Attribute prototype(%s) discards earlier prototype attribute in same sub
(W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for
example. Since each sub can only have one prototype, the earlier
declaration(s) are discarded while the last one is applied.
=item av_reify called on tied array
(S debugging) This indicates that something went wrong and Perl got I<very>
confused about C<@_> or C<@DB::args> being tied.
=item Bad arg length for %s, is %u, should be %d
(F) You passed a buffer of the wrong size to one of msgctl(), semctl()
or shmctl(). In C parlance, the correct sizes are, respectively,
S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
S<sizeof(struct shmid_ds *)>.
=item Bad evalled substitution pattern
(F) You've used the C</e> switch to evaluate the replacement for a
substitution, but perl found a syntax error in the code to evaluate,
most likely an unexpected right brace '}'.
=item Bad filehandle: %s
(F) A symbol was passed to something wanting a filehandle, but the
symbol has no filehandle associated with it. Perhaps you didn't do an
open(), or did it in another package.
=item Bad free() ignored
(S malloc) An internal routine called free() on something that had never
been malloc()ed in the first place. Mandatory, but can be disabled by
setting environment variable C<PERL_BADFREE> to 0.
This message can be seen quite often with DB_File on systems with "hard"
dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB>
which is left unnoticed if C<DB> uses I<forgiving> system malloc().
=item Bad infix plugin result (%zd) - did not consume entire identifier <%s>
(F) A plugin using the C<PL_infix_plugin> mechanism to parse an infix
keyword consumed part of a named identifier operator name but did not
consume all of it. This is not permitted as it leads to fragile parsing
results.
=item Badly placed ()'s
(A) You've accidentally run your script through B<csh> instead
of Perl. Check the #! line, or manually feed your script into
Perl yourself.
=item Bad name after %s
(F) You started to name a symbol by using a package prefix, and then
didn't finish the symbol. In particular, you can't interpolate outside
of quotes, so
$var = 'myvar';
$sym = mypack::$var;
is not the same as
$var = 'myvar';
$sym = "mypack::$var";
=item Bad plugin affecting keyword '%s'
(F) An extension using the keyword plugin mechanism violated the
plugin API.
=item Bad realloc() ignored
(S malloc) An internal routine called realloc() on something that
had never been malloc()ed in the first place. Mandatory, but can
be disabled by setting the environment variable C<PERL_BADFREE> to 1.
=item Bad symbol for %s
(P) An internal request asked to add an entry of the named type to something that
wasn't a symbol table entry.
=item Bad symbol for scalar
(P) An internal request asked to add a scalar entry to something that
wasn't a symbol table entry.
=item Bareword found in conditional
(W bareword) The compiler found a bareword where it expected a
conditional, which often indicates that an || or && was parsed as part
of the last argument of the previous construct, for example:
open FOO || die;
It may also indicate a misspelled constant that has been interpreted as
a bareword:
use constant TYPO => 1;
if (TYOP) { print "foo" }
The C<strict> pragma is useful in avoiding such errors.
=item Bareword in require contains "%s"
=item Bareword in require maps to disallowed filename "%s"
=item Bareword in require maps to empty filename
(F) The bareword form of require has been invoked with a filename which could
not have been generated by a valid bareword permitted by the parser. You
shouldn't be able to get this error from Perl code, but XS code may throw it
if it passes an invalid module name to C<Perl_load_module>.
=item Bareword in require must not start with a double-colon: "%s"
(F) In C<require Bare::Word>, the bareword is not allowed to start with a
double-colon. Write C<require ::Foo::Bar> as C<require Foo::Bar> instead.
=item Bareword "%s" not allowed while "strict subs" in use
(F) With "strict subs" in use, a bareword is only allowed as a
subroutine identifier, in curly brackets or to the left of the "=>"
symbol. Perhaps you need to predeclare a subroutine?
=item Bareword "%s" refers to nonexistent package
(W bareword) You used a qualified bareword of the form C<Foo::>, but the
compiler saw no other uses of that namespace before that point. Perhaps
you need to predeclare a package?
=item Bareword filehandle "%s" not allowed under 'no feature "bareword_filehandles"'
(F) You attempted to use a bareword filehandle with the
C<bareword_filehandles> feature disabled.
Only the built-in handles C<STDIN>, C<STDOUT>, C<STDERR>, C<ARGV>,
C<ARGVOUT> and C<DATA> can be used with the C<bareword_filehandles>
feature disabled.
=item BEGIN failed--compilation aborted
(F) An untrapped exception was raised while executing a BEGIN
subroutine. Compilation stops immediately and the interpreter is
exited.
=item BEGIN not safe after errors--compilation aborted
(F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
implies a C<BEGIN {}>) after one or more compilation errors had already
occurred. Since the intended environment for the C<BEGIN {}> could not
be guaranteed (due to the errors), and since subsequent code likely
depends on its correct operation, Perl just gave up.
=item \%d better written as $%d
(W syntax) Outside of patterns, backreferences live on as variables.
The use of backslashes is grandfathered on the right-hand side of a
substitution, but stylistically it's better to use the variable form
because other Perl programmers will expect it, and it works better if
there are more than 9 backreferences.
=item Binary number > 0b11111111111111111111111111111111 non-portable
(W portable) The binary number you specified is larger than 2**32-1
(4294967295) and therefore non-portable between systems. See
L<perlport> for more on portability concerns.
=item bind() on closed socket %s
(W closed) You tried to do a bind on a closed socket. Did you forget to
check the return value of your socket() call? See L<perlfunc/bind>.
=item binmode() on closed filehandle %s
(W unopened) You tried binmode() on a filehandle that was never opened.
Check your control flow and number of arguments.
=item Bit vector size > 32 non-portable
(W portable) Using bit vector sizes larger than 32 is non-portable.
=item Bizarre copy of %s
(P) Perl detected an attempt to copy an internal value that is not
copiable.
=item Bizarre SvTYPE [%d]
(P) When starting a new thread or returning values from a thread, Perl
encountered an invalid data type.
=item Both or neither range ends should be Unicode in regex; marked by
S<<-- HERE> in m/%s/
(W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
In a bracketed character class in a regular expression pattern, you
had a range which has exactly one end of it specified using C<\N{}>, and
the other end is specified using a non-portable mechanism. Perl treats
the range as a Unicode range, that is, all the characters in it are
considered to be the Unicode characters, and which may be different code
points on some platforms Perl runs on. For example, C<[\N{U+06}-\x08]>
is treated as if you had instead said C<[\N{U+06}-\N{U+08}]>, that is it
matches the characters whose code points in Unicode are 6, 7, and 8.
But that C<\x08> might indicate that you meant something different, so
the warning gets raised.
=item Buffer overflow in prime_env_iter: %s
(W internal) A warning peculiar to VMS. While Perl was preparing to
iterate over %ENV, it encountered a logical name or symbol definition
which was too long, so it was truncated to the string shown.
=item Built-in function '%s' is experimental
(S experimental::builtin) A call is being made to a function in the
C<builtin::> namespace, which is currently experimental. The existence
or nature of the function may be subject to change in a future version
of Perl.
=item builtin::import can only be called at compile time
(F) The C<import> method of the C<builtin> package was invoked when no code
is currently being compiled. Since this method is used to introduce new
lexical subroutines into the scope currently being compiled, this is not
going to have any effect.
=item builtin::unimport can only be called at compile time
(F) The C<unimport> method of the C<builtin> package was invoked when no code
is currently being compiled. Since this method is used to remove
previously-introduced lexical subroutines from the scope currently being
compiled, this is not going to have any effect.
=item Builtin version bundle "%s" is not supported by Perl
(F) You attempted to C<use builtin :ver> for a version number that is either
older than 5.39 (when the ability was added), or newer than the current perl
version.
=item Callback called exit
(F) A subroutine invoked from an external package via call_sv()
exited by calling exit.
=item %s() called too early to check prototype
(W prototype) You've called a function that has a prototype before the
parser saw a definition or declaration for it, and Perl could not check
that the call conforms to the prototype. You need to either add an
early prototype declaration for the subroutine in question, or move the
subroutine definition ahead of the call to get proper prototype
checking. Alternatively, if you are certain that you're calling the
function correctly, you may put an ampersand before the name to avoid
the warning. See L<perlsub>.
=item Cannot assign :param(%s) to field %s because that name is already in use
(F) An attempt was made to apply a parameter name to a field, when the name
is already being used by another field in the same class, or one of its
parent classes. This would cause a name clash so is not allowed.
=item Cannot chr %f
(F) You passed an invalid number (like an infinity or not-a-number) to C<chr>.
=item Cannot complete in-place edit of %s: %s
(F) Your perl script appears to have changed directory while
performing an in-place edit of a file specified by a relative path,
and your system doesn't include the directory relative POSIX functions
needed to handle that.
=item Cannot compress %f in pack
(F) You tried compressing an infinity or not-a-number as an unsigned
integer with BER, which makes no sense.
=item Cannot compress integer in pack
(F) An argument to pack("w",...) was too large to compress.
The BER compressed integer format can only be used with positive
integers, and you attempted to compress a very large number (> 1e308).
See L<perlfunc/pack>.
=item Cannot compress negative numbers in pack
(F) An argument to pack("w",...) was negative. The BER compressed integer
format can only be used with positive integers. See L<perlfunc/pack>.
=item Cannot convert a reference to %s to typeglob
(F) You manipulated Perl's symbol table directly, stored a reference
in it, then tried to access that symbol via conventional Perl syntax.
The access triggers Perl to autovivify that typeglob, but it there is
no legal conversion from that type of reference to a typeglob.
=item Cannot copy to %s
(P) Perl detected an attempt to copy a value to an internal type that cannot
be directly assigned to.
=item Cannot create class %s as it already has a non-empty @ISA
(F) An attempt was made to create a class out of a package that already has
an C<@ISA> array, and the array is not empty. This is not permitted, as it
would lead to a class with inconsistent inheritance.
=item Cannot find encoding "%s"
(S io) You tried to apply an encoding that did not exist to a filehandle,
either with open() or binmode().
=item Cannot invoke a method of "%s" on an instance of "%s"
(F) You tried to directly call a C<method> subroutine of one class by passing
in a value that is an instance of a different class. This is not permitted,
as the method would not have access to the correct instance fields.
=item Cannot invoke method on a non-instance
(F) You tried to directly call a C<method> subroutine of a class by passing
in a value that is not an instance of that class. This is not permitted, as
the method would not then have access to its instance fields.
=item Cannot open %s as a dirhandle: it is already open as a filehandle
(F) You tried to use opendir() to associate a dirhandle to a symbol (glob
or scalar) that already holds a filehandle. Since this idiom might render
your code confusing, it was deprecated in Perl 5.10. As of Perl 5.28, it
is a fatal error.
=item Cannot open %s as a filehandle: it is already open as a dirhandle
(F) You tried to use open() to associate a filehandle to a symbol (glob
or scalar) that already holds a dirhandle. Since this idiom might render
your code confusing, it was deprecated in Perl 5.10. As of Perl 5.28, it
is a fatal error.
=item Cannot '%s' outside of a 'class'
(F) You attempted to use one of the keywords that only makes sense inside
a C<class> definition, at a location that is not inside such a class.
=item Cannot pack %f with '%c'
(F) You tried converting an infinity or not-a-number to an integer,
which makes no sense.
=item Cannot printf %f with '%c'
(F) You tried printing an infinity or not-a-number as a character (%c),
which makes no sense. Maybe you meant '%s', or just stringifying it?
=item Cannot reopen existing class "%s"
(F) You tried to begin a C<class> definition for a class that already exists.
A class may only have one definition block.
=item Cannot set tied @DB::args
(F) C<caller> tried to set C<@DB::args>, but found it tied. Tying C<@DB::args>
is not supported. (Before this error was added, it used to crash.)
=item Cannot tie unreifiable array
(P) You somehow managed to call C<tie> on an array that does not
keep a reference count on its arguments and cannot be made to
do so. Such arrays are not even supposed to be accessible to
Perl code, but are only used internally.
=item Cannot use __CLASS__ outside of a method or field initializer expression
(F) A C<__CLASS__> expression yields the class name of the object instance
executing the current method, and therefore it can only be placed inside an
actual method (or method-like expression, such as a field initializer
expression).
=item Cannot yet reorder sv_vcatpvfn() arguments from va_list
(F) Some XS code tried to use C<sv_vcatpvfn()> or a related function with a
format string that specifies explicit indexes for some of the elements, and
using a C-style variable-argument list (a C<va_list>). This is not currently
supported. XS authors wanting to do this must instead construct a C array
of C<SV*> scalars containing the arguments.
=item Can only compress unsigned integers in pack
(F) An argument to pack("w",...) was not an integer. The BER compressed
integer format can only be used with positive integers, and you attempted
to compress something else. See L<perlfunc/pack>.
=item Can't "%s" out of a "defer" block
(F) An attempt was made to jump out of the scope of a C<defer> block by using
a control-flow statement such as C<return>, C<goto> or a loop control. This is
not permitted.
=item Can't "%s" out of a "finally" block
(F) Similar to above, but involving a C<finally> block at the end of a
C<try>/C<catch> construction rather than a C<defer> block.
=item Can't bless an object reference
(F) You attempted to call C<bless> on a value that already refers to a real
object instance.
=item Can't bless non-reference value
(F) Only hard references may be blessed. This is how Perl "enforces"
encapsulation of objects. See L<perlobj>.
=item Can't "break" in a loop topicalizer
(F) You called C<break>, but you're in a C<foreach> block rather than
a C<given> block. You probably meant to use C<next> or C<last>.
=item Can't "break" outside a given block
(F) You called C<break>, but you're not inside a C<given> block.
=item Can't call destructor for 0x%p in global destruction
(S) This should not happen. Internals code has set up a destructor
using C<mortal_destructor_sv> or C<mortal_destructor_x> which is firing
during global destruction. Please attempt to reduce the code that triggers
this warning down to a small an example as possible and then report the
problem to L<https://github.com/Perl/perl5/issues/new/choose>
=item Can't call method "%s" on an undefined value
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an undefined value. Something
like this will reproduce the error:
$BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
=item Can't call method "%s" on unblessed reference
(F) A method call must know in what package it's supposed to run. It
ordinarily finds this out from the object reference you supply, but you
didn't supply an object reference in this case. A reference isn't an
object reference until it has been blessed. See L<perlobj>.
=item Can't call method "%s" without a package or object reference
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an expression that returns a
defined value which is neither an object reference nor a package name.
Something like this will reproduce the error:
$BADREF = 42;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
=item Can't call mro_isa_changed_in() on anonymous symbol table
(P) Perl got confused as to whether a hash was a plain hash or a
symbol table hash when trying to update @ISA caches.
=item Can't call mro_method_changed_in() on anonymous symbol table
(F) An XS module tried to call C<mro_method_changed_in> on a hash that was
not attached to the symbol table.
=item Can't chdir to %s
(F) You called C<perl -x/foo/bar>, but F</foo/bar> is not a directory
that you can chdir to, possibly because it doesn't exist.
=item Can't coerce %s to %s in %s
(F) Certain types of SVs, in particular real symbol table entries
(typeglobs), can't be forced to stop being what they are. So you can't
say things like:
*foo += 1;
You CAN say
$foo = *foo;
$foo += 1;
but then $foo no longer contains a glob.
=item Can't "continue" outside a when block
(F) You called C<continue>, but you're not inside a C<when>
or C<default> block.
=item can't convert empty path
(F) On Cygwin, you called a path conversion function with an empty path.
Only non-empty paths are legal.
=item Can't create pipe mailbox
(P) An error peculiar to VMS. The process is suffering from exhausted
quotas or other plumbing problems.
=item Can't declare %s in "%s"
(F) Only scalar, array, and hash variables may be declared as "my", "our" or
"state" variables. They must have ordinary identifiers as names.
=item Can't "default" outside a topicalizer
(F) You have used a C<default> block that is neither inside a
C<foreach> loop nor a C<given> block. (Note that this error is
issued on exit from the C<default> block, so you won't get the
error if you use an explicit C<continue>.)
=item Can't determine class of operator %s, assuming BASEOP
(S) This warning indicates something wrong in the internals of perl.
Perl was trying to find the class (e.g. LISTOP) of a particular OP,
and was unable to do so. This is likely to be due to a bug in the perl
internals, or due to a bug in XS code which manipulates perl optrees.
=item Can't do inplace edit: %s is not a regular file
(S inplace) You tried to use the B<-i> switch on a special file, such as
a file in /dev, a FIFO or an uneditable directory. The file was ignored.
=item Can't do inplace edit on %s: %s
(S inplace) The creation of the new file failed for the indicated
reason.
=item Can't do inplace edit: %s would not be unique
(S inplace) Your filesystem does not support filenames longer than 14
characters and Perl was unable to create a unique filename during
inplace editing with the B<-i> switch. The file was ignored.
=item Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".
(W locale) You are 1) running under "C<use locale>"; 2) the current
locale is not a UTF-8 one; 3) you tried to do the designated case-change
operation on the specified Unicode character; and 4) the result of this
operation would mix Unicode and locale rules, which likely conflict.
Mixing of different rule types is forbidden, so the operation was not
done; instead the result is the indicated value, which is the best
available that uses entirely Unicode rules. That turns out to almost
always be the original character, unchanged.
It is generally a bad idea to mix non-UTF-8 locales and Unicode, and
this issue is one of the reasons why. This warning is raised when
Unicode rules would normally cause the result of this operation to
contain a character that is in the range specified by the locale,
0..255, and hence is subject to the locale's rules, not Unicode's.
If you are using locale purely for its characteristics related to things
like its numeric and time formatting (and not C<LC_CTYPE>), consider
using a restricted form of the locale pragma (see L<perllocale/The "use
locale" pragma>) like "S<C<use locale ':not_characters'>>".
Note that failed case-changing operations done as a result of
case-insensitive C</i> regular expression matching will show up in this
warning as having the C<fc> operation (as that is what the regular
expression engine calls behind the scenes.)
=item Can't do waitpid with flags
(F) This machine doesn't have either waitpid() or wait4(), so only