📄 perldiag.pod
字号:
substitution, but stylistically it's better to use the variable formbecause other Perl programmers will expect it, and it works better ifthere 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. SeeL<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 tocheck the return value of your socket() call? See L<perlfunc/bind>.=item Bit vector size > 32 non-portable(W portable) Using bit vector sizes larger than 32 is non-portable.=item Bizarre copy of %s in %s(P) Perl detected an attempt to copy an internal value that is notcopyable.=item B<-P> not allowed for setuid/setgid script(F) The script would have to be opened by the C preprocessor by name,which provides a race condition that breaks security.=item Buffer overflow in prime_env_iter: %s(W internal) A warning peculiar to VMS. While Perl was preparing toiterate over %ENV, it encountered a logical name or symbol definitionwhich was too long, so it was truncated to the string shown.=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 theparser saw a definition or declaration for it, and Perl could not checkthat the call conforms to the prototype. You need to either add anearly prototype declaration for the subroutine in question, or move thesubroutine definition ahead of the call to get proper prototypechecking. Alternatively, if you are certain that you're calling thefunction correctly, you may put an ampersand before the name to avoidthe warning. See L<perlsub>.=item / cannot take a count(F) You had an unpack template indicating a counted-length string, butyou have also specified an explicit size for the string. SeeL<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 call method "%s" in empty package "%s"(F) You called a method correctly, and it correctly indicated a packagefunctioning as a class, but that package doesn't have ANYTHING definedin it, let alone methods. See L<perlobj>.=item Can't call method "%s" on an undefined value(F) You used the syntax of a method call, but the slot filled by theobject reference or package name contains an undefined value. Somethinglike 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. Itordinarily finds this out from the object reference you supply, but youdidn't supply an object reference in this case. A reference isn't anobject 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 theobject reference or package name contains an expression that returns adefined 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 directorythat 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 fornosuid.=item Can't coerce array into hash(F) You used an array where a hash was expected, but the array has noinformation on how to map from keys to array indices. You can do thatonly with arrays that have a hash reference at index 0.=item Can't coerce %s to integer 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'tsay things like: *foo += 1;You CAN say $foo = *foo; $foo += 1;but then $foo no longer contains a glob.=item Can't coerce %s to number in %s(F) Certain types of SVs, in particular real symbol table entries(typeglobs), can't be forced to stop being what they are.=item Can't coerce %s to string in %s(F) Certain types of SVs, in particular real symbol table entries(typeglobs), can't be forced to stop being what they are.=item Can't create pipe mailbox(P) An error peculiar to VMS. The process is suffering from exhaustedquotas or other plumbing problems.=item Can't declare class for non-scalar %s in "%s"(S) Currently, only scalar variables can declared with a specific classqualifier in a "my" or "our" declaration. The semantics may be extendedfor other types of variables in future.=item Can't declare %s in "%s"(F) Only scalar, array, and hash variables may be declared as "my" or"our" variables. They must have ordinary identifiers as names.=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 asa 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 indicatedreason.=item Can't do inplace edit without backup(F) You're on a system such as MS-DOS that gets confused if you tryreading from a deleted (but still opened) file. You have to sayC<-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 14characters and Perl was unable to create a unique filename duringinplace editing with the B<-i> switch. The file was ignored.=item Can't do {n,m} with n > m before << HERE in regex m/%s/(F) Minima must be less than or equal to maxima. If you really want yourregexp to match something 0 times, just put {0}. The << HERE shows in theregular expression about where the problem was discovered. See L<perlre>.=item Can't do setegid!(P) The setegid() call failed for some reason in the setuid emulator ofsuidperl.=item Can't do seteuid!(P) The setuid emulator of suidperl failed for some reason.=item Can't do setuid(F) This typically means that ordinary perl tried to exec suidperl to dosetuid emulation, but couldn't exec it. It looks for a name of the formsperl5.000 in the same directory that the perl executable resides underthe name perl5.000, typically /usr/local/bin on Unix machines. If thefile is there, check the execute permissions. If it isn't, ask yoursysadmin why he and/or she removed it.=item Can't do waitpid with flags(F) This machine doesn't have either waitpid() or wait4(), so onlywaitpid() without flags is emulated.=item Can't emulate -%s on #! line(F) The #! line specifies a switch that doesn't make sense at thispoint. For example, it'd be kind of silly to put a B<-x> on the #!line.=item Can't exec "%s": %s(W exec) An system(), exec(), or piped open call could not execute thenamed program for the indicated reason. Typical reasons include: thepermissions were wrong on the file, the file wasn't found inC<$ENV{PATH}>, the executable in question was compiled for anotherarchitecture, or the #! line in a script points to an interpreter thatcan'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 becausethat's what the #! line said. If that's not what you wanted, you mayneed 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 executefound 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 thereis no builtin with the name C<word>.=item Can't find label %s(F) You said to goto a label that isn't mentioned anywhere that it'spossible 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 befound 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 befound in the PATH, or at least not with the correct permissions. Thescript 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 meansthat the closing delimiter was omitted. Because bracketed quotes countnesting 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 includedunseen whitespace before or after your closing tag. A good programmer'seditor will have a way to help you find these characters.=item Can't find %s property definition %s (F) You may have tried to use C<\p> which means a Unicode property forexample \p{Lu} is all uppercase letters. Escape the C<\p>, eitherC<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, untilpossible C<\E>).=item Can't fork(F) A fatal error occurred while trying to fork while opening apipeline.=item Can't get filespec - stale stat buffer?(S) A warning peculiar to VMS. This arises because of the differencebetween access checks under VMS and under the Unix model Perl assumes.Under VMS, access checks are done by filename, rather than by bits inthe stat buffer, so that ACLs and other protections can be taken intoaccount. Unfortunately, Perl assumes that the stat buffer contains allthe necessary information, and passes it, instead of the filespec, tothe access checking routine. It will try to retrieve the filespec usingthe device name and FID present in the stat buffer, but this works onlyif you haven't made a subsequent call to the CRTL stat() routine,because the device name is overwritten with each call. If this warningappears, the name lookup failed, and the access checking routine gave upand returned FALSE, just to be conservative. (Note: The access checkingroutine knows about the Perl C<stat> operator and file tests, so youshouldn't ever see this warning in response to a Perl command; it arisesonly 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 apipe, 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 yourmailbox 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 foreachloop. 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 likea block, except that it isn't a proper block. This usually occurs ifyou 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 an eval-string(F) The "goto subroutine" call can't be used to jump out of an eval"string". (You can use it to jump out of an eval {BLOCK}, but youprobably don't want to.)=item Can't goto subroutine outside a subroutine(F) The deeply magical "goto subroutine" call can only replace onesubroutine call for another. It can't manufacture one out of wholecloth. In general you should be calling it out of only an AUTOLOADroutine 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 SIGCHLDsignal (sometimes known as SIGCLD) disabled. Since disabling thissignal will interfere with proper determination of exit status of childprocesses, Perl has reset the signal to its default value. Thissituation typically indicates that the parent program under which Perlmay be running (e.g. cron) is being very careless.=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 currentblock. 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 canusually double the curlies to get the same effect though, because theinner curlies will be considered a block that loops once. SeeL<perlfunc/last>.=item Can't localize lexical variable %s(F) You used local on a variable name that was previously declared as alexical variable using "my". This is not allowed. If you want tolocalize a package variable of the same name, qualify it with thepackage name.=item Can't localize pseudo-hash element(F) You said something like C<< local $ar->{'key'} >>, where $ar is areference to a pseudo-hash. That hasn't been implemented yet, but youcan get a similar effect by localizing the corresponding array elementdirectly -- C<< local $ar->[$ar->[0]{'key'}] >>.=item Can't localize through a reference
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -