/
perldiag.pod
5779 lines (3877 loc) · 209 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.
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 Allocation too large: %x
(X) You can't allocate more than 64K on an MS-DOS machine.
=item '%c' allowed only after types %s
(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only
after certain types. See L<perlfunc/pack>.
=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
(W ambiguous)(S) 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 %c resolved as operator %c
(W 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 Ambiguous use of -%s resolved as -&%s()
(W 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 's//le...' resolved as 's// le...'; Rewrite as 's//el' if you meant 'use locale rules and evaluate rhs as an expression'. In Perl 5.18, it will be resolved the other way
(W deprecated, ambiguous) You wrote a pattern match with substitution
immediately followed by "le". In Perl 5.16 and earlier, this is
resolved as meaning to take the result of the substitution, and see if
it is stringwise less-than-or-equal-to what follows in the expression.
Having the "le" immediately following a pattern is deprecated behavior,
so in Perl 5.18, this expression will be resolved as meaning to do the
pattern match using the rules of the current locale, and evaluate the
rhs as an expression when doing the substitution. In 5.14, and 5.16 if
you want the latter interpretation, you can simply write "el" instead.
But note that the C</l> modifier should not be used explicitly anyway;
you should use C<use locale> instead. See L<perllocale>.
=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 %s argument is not a HASH or ARRAY element or a subroutine
(F) The argument to exists() must be a hash or array element or a
subroutine with an ampersand, such as:
$foo{$bar}
$ref->{"susie"}[12]
&do_something
=item %s argument is not a HASH or ARRAY element or slice
(F) The argument to delete() must be either a hash or array element,
such as:
$foo{$bar}
$ref->{"susie"}[12]
or a hash or array slice, such as:
@foo[$bar, $baz, $xyzzy]
@{$ref->[12]}{"susie", "queue"}
=item %s argument is not a subroutine name
(F) The argument to exists() for C<exists &sub> must be a subroutine
name, and not a subroutine call. C<exists &sub()> will generate this
error.
=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.
=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 Array @%s missing the @ in argument %d of %s()
(D deprecated) Really old Perl let you omit the @ on array names in some
spots. This is now heavily deprecated.
=item assertion botched: %s
(X) The malloc package that comes with Perl had an internal failure.
=item Assertion failed: file "%s"
(X) A general assertion failed. The file in question must be examined.
=item Assigning non-zero to $[ is no longer possible
(F) When the "array_base" feature is disabled (e.g., under C<use v5.16;>)
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 A thread exited while %d threads were running
(W threads)(S) When using threaded Perl, a thread (not necessarily
the main thread) exited while there were still other threads running.
Usually it's a good idea first to collect the return values of the
created threads by joining them, and only then to exit from the main
thread. See L<threads>.
=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 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
(W 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 join self
(F) You tried to join a thread from within itself, which is an
impossible task. You may be joining the wrong thread, or you may need
to move the join() to some other thread.
=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) 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 "locked" is deprecated
(D deprecated) You have used the attributes pragma to modify the
"locked" attribute on a code reference. The :locked attribute is
obsolete, has had no effect since 5005 threads were removed, and
will be removed in a future release of Perl 5.
=item Attribute "unique" is deprecated
(D deprecated) You have used the attributes pragma to modify
the "unique" attribute on an array, hash or scalar reference.
The :unique attribute has had no effect since Perl 5.8.8, and
will be removed in a future release of Perl 5.
=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 hash
(P) One of the internal hash routines was passed a null HV pointer.
=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 array
(P) An internal request asked to add an array entry to something that
wasn't a symbol table entry.
=item Bad symbol for dirhandle
(P) An internal request asked to add a dirhandle entry to something
that wasn't a symbol table entry.
=item Bad symbol for filehandle
(P) An internal request asked to add a filehandle entry to something
that wasn't a symbol table entry.
=item Bad symbol for hash
(P) An internal request asked to add a hash 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 "%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 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 \1 better written as $1
(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 "\b{" is deprecated; use "\b\{" instead
=item "\B{" is deprecated; use "\B\{" instead
(W deprecated, regexp) Use of an unescaped "{" immediately following a
C<\b> or C<\B> is now deprecated so as to reserve its use for Perl
itself in a future release.
=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 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 Bizarre SvTYPE [%d]
(P) When starting a new thread or return values from a thread, Perl
encountered an invalid data type.
=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 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 Infinity or 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 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 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 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 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 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 chdir to %s
(F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
that you can chdir to, possibly because it doesn't exist.
=item Can't check filesystem of script "%s" for nosuid
(P) For some reason you can't check the filesystem of the script for
nosuid.
=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 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 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, or a FIFO. 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 without backup
(F) You're on a system such as MS-DOS that gets confused if you try
reading from a deleted (but still opened) file. You have to say
C<-i.bak>, or some such.
=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 {n,m} with n > m in regex; marked by <-- HERE in m/%s/
(F) Minima must be less than or equal to maxima. If you really
want your regexp to match something 0 times, just put {0}. The
<-- HERE shows in the regular expression about where the problem
was discovered. See L<perlre>.
=item Can't do waitpid with flags
(F) This machine doesn't have either waitpid() or wait4(), so only
waitpid() without flags is emulated.
=item Can't emulate -%s on #! line
(F) The #! line specifies a switch that doesn't make sense at this
point. For example, it'd be kind of silly to put a B<-x> on the #!
line.
=item Can't %s %s-endian %ss on this platform
(F) Your platform's byte-order is neither big-endian nor little-endian,
or it has a very strange pointer size. Packing and unpacking big- or
little-endian floating point values and pointers may not be possible.
See L<perlfunc/pack>.
=item Can't exec "%s": %s
(W exec) A system(), exec(), or piped open call could not execute the
named program for the indicated reason. Typical reasons include: the
permissions were wrong on the file, the file wasn't found in
C<$ENV{PATH}>, the executable in question was compiled for another
architecture, or the #! line in a script points to an interpreter that
can't be run for similar reasons. (Or maybe your system doesn't support
#! at all.)
=item Can't exec %s
(F) Perl was trying to execute the indicated program for you because
that's what the #! line said. If that's not what you wanted, you may
need to mention "perl" on the #! line somewhere.
=item Can't execute %s
(F) You used the B<-S> switch, but the copies of the script to execute
found in the PATH did not have correct permissions.
=item Can't find an opnumber for "%s"
(F) A string of a form C<CORE::word> was given to prototype(), but there
is no builtin with the name C<word>.
=item Can't find %s character property "%s"
(F) You used C<\p{}> or C<\P{}> but the character property by that name
could not be found. Maybe you misspelled the name of the property?
See L<perluniprops/Properties accessible through \p{} and \P{}>
for a complete list of available properties.
=item Can't find label %s
(F) You said to goto a label that isn't mentioned anywhere that it's
possible for us to go to. See L<perlfunc/goto>.
=item Can't find %s on PATH
(F) You used the B<-S> switch, but the script to execute could not be
found in the PATH.
=item Can't find %s on PATH, '.' not in PATH
(F) You used the B<-S> switch, but the script to execute could not be
found in the PATH, or at least not with the correct permissions. The
script exists in the current directory, but PATH prohibits running it.
=item Can't find string terminator %s anywhere before EOF
(F) Perl strings can stretch over multiple lines. This message means
that the closing delimiter was omitted. Because bracketed quotes count
nesting levels, the following is missing its final parenthesis:
print q(The character '(' starts a side comment.);
If you're getting this error from a here-document, you may have
included unseen whitespace before or after your closing tag or there
may not be a linebreak after it. A good programmer's editor will have
a way to help you find these characters (or lack of characters). See
L<perlop> for the full details on here-documents.
=item Can't find Unicode property definition "%s"
(F) You may have tried to use C<\p> which means a Unicode
property (for example C<\p{Lu}> matches all uppercase
letters). If you did mean to use a Unicode property, see
L<perluniprops/Properties accessible through \p{} and \P{}>
for a complete list of available properties. If you didn't
mean to use a Unicode property, escape the C<\p>, either by
C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, or
until C<\E>).
=item Can't fork: %s
(F) A fatal error occurred while trying to fork while opening a
pipeline.
=item Can't fork, trying again in 5 seconds
(W pipe) A fork in a piped open failed with EAGAIN and will be retried
after five seconds.
=item Can't get filespec - stale stat buffer?
(S) A warning peculiar to VMS. This arises because of the difference
between access checks under VMS and under the Unix model Perl assumes.
Under VMS, access checks are done by filename, rather than by bits in
the stat buffer, so that ACLs and other protections can be taken into
account. Unfortunately, Perl assumes that the stat buffer contains all
the necessary information, and passes it, instead of the filespec, to
the access-checking routine. It will try to retrieve the filespec using
the device name and FID present in the stat buffer, but this works only
if you haven't made a subsequent call to the CRTL stat() routine,
because the device name is overwritten with each call. If this warning
appears, the name lookup failed, and the access-checking routine gave up
and returned FALSE, just to be conservative. (Note: The access-checking
routine knows about the Perl C<stat> operator and file tests, so you
shouldn't ever see this warning in response to a Perl command; it arises
only if some internal code takes stat buffers lightly.)
=item Can't get pipe mailbox device name
(P) An error peculiar to VMS. After creating a mailbox to act as a
pipe, Perl can't retrieve its name for later use.
=item Can't get SYSGEN parameter value for MAXBUF
(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
mailbox buffers to be, and didn't get an answer.
=item Can't "goto" into the middle of a foreach loop
(F) A "goto" statement was executed to jump into the middle of a foreach
loop. You can't get there from here. See L<perlfunc/goto>.
=item Can't "goto" out of a pseudo block
(F) A "goto" statement was executed to jump out of what might look like
a block, except that it isn't a proper block. This usually occurs if
you tried to jump out of a sort() block or subroutine, which is a no-no.
See L<perlfunc/goto>.
=item Can't goto subroutine from a sort sub (or similar callback)
(F) The "goto subroutine" call can't be used to jump out of the
comparison sub for a sort(), or from a similar callback (such
as the reduce() function in List::Util).
=item Can't goto subroutine from an eval-%s
(F) The "goto subroutine" call can't be used to jump out of an eval
"string" or block.
=item Can't goto subroutine outside a subroutine
(F) The deeply magical "goto subroutine" call can only replace one
subroutine call for another. It can't manufacture one out of whole
cloth. In general you should be calling it out of only an AUTOLOAD
routine anyway. See L<perlfunc/goto>.
=item Can't ignore signal CHLD, forcing to default
(W signal) Perl has detected that it is being run with the SIGCHLD
signal (sometimes known as SIGCLD) disabled. Since disabling this
signal will interfere with proper determination of exit status of child
processes, Perl has reset the signal to its default value. This
situation typically indicates that the parent program under which Perl
may be running (e.g. cron) is being very careless.
=item Can't kill a non-numeric process ID
(F) Process identifiers must be (signed) integers. It is a fatal error to
attempt to kill() an undefined, empty-string or otherwise non-numeric
process identifier.
=item Can't "last" outside a loop block
(F) A "last" statement was executed to break out of the current block,
except that there's this itty bitty problem called there isn't a current
block. Note that an "if" or "else" block doesn't count as a "loopish"
block, as doesn't a block given to sort(), map() or grep(). You can
usually double the curlies to get the same effect though, because the
inner curlies will be considered a block that loops once. See
L<perlfunc/last>.
=item Can't linearize anonymous symbol table
(F) Perl tried to calculate the method resolution order (MRO) of a
package, but failed because the package stash has no name.
=item Can't load '%s' for module %s
(F) The module you tried to load failed to load a dynamic extension.
This may either mean that you upgraded your version of perl to one
that is incompatible with your old dynamic extensions (which is known
to happen between major versions of perl), or (more likely) that your
dynamic extension was built against an older version of the library
that is installed on your system. You may need to rebuild your old
dynamic extensions.
=item Can't localize lexical variable %s
(F) You used local on a variable name that was previously declared as a
lexical variable using "my" or "state". This is not allowed. If you
want to localize a package variable of the same name, qualify it with
the package name.
=item Can't localize through a reference
(F) You said something like C<local $$ref>, which Perl can't currently
handle, because when it goes to restore the old value of whatever $ref
pointed to after the scope of the local() is finished, it can't be sure
that $ref will still be a reference.
=item Can't locate %s
(F) You said to C<do> (or C<require>, or C<use>) a file that couldn't be found.
Perl looks for the file in all the locations mentioned in @INC, unless
the file name included the full path to the file. Perhaps you need
to set the PERL5LIB or PERL5OPT environment variable to say where the
extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
L<perlfunc/require> and L<lib>.
=item Can't locate auto/%s.al in @INC
(F) A function (or method) was called in a package which allows
autoload, but there is no function to autoload. Most probable causes
are a misprint in a function/method name or a failure to C<AutoSplit>
the file, say, by doing C<make install>.
=item Can't locate loadable object for module %s in @INC
(F) The module you loaded is trying to load an external library, like
for example, F<foo.so> or F<bar.dll>, but the L<DynaLoader> module was
unable to locate this library. See L<DynaLoader>.
=item Can't locate object method "%s" via package "%s"
(F) You called a method correctly, and it correctly indicated a package
functioning as a class, but that package doesn't define that particular
method, nor does any of its base classes. See L<perlobj>.
=item Can't locate package %s for @%s::ISA
(W syntax) The @ISA array contained the name of another package that
doesn't seem to exist.