This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Delete suidperl messages from perldiag
[perl5.git] / pod / perldiag.pod
index a338e89..1c259ee 100644 (file)
@@ -177,13 +177,6 @@ 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 Args must match #! line
-
-(F) The setuid emulator requires that the arguments Perl was invoked
-with match the arguments specified on the #! line.  Since some systems
-impose a one-argument limit on the #! line, try combining switches;
-for example, turn C<-w -U> into C<-wU>.
-
 =item Arg too short for msgsnd
 
 (F) msgsnd() requires a string at least as long as sizeof(long).
@@ -1527,6 +1520,15 @@ array is empty, just use C<if (@array) { # not empty }> for example.
 checks for an undefined I<scalar> value.  If you want to see if the hash
 is empty, just use C<if (%hash) { # not empty }> for example.
 
+=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in m/%s/
+
+(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
+most likely cause of this error is that you left out a parenthesis inside
+of the C<....> part.
+
+The <-- HERE shows in the regular expression about where the problem was
+discovered.
+
 =item %s defines neither package nor VERSION--version check failed
 
 (F) You said something like "use Module 42" but in the Module file
@@ -2897,10 +2899,6 @@ for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
 module) didn't define a C<DB::sub> routine to be called at the beginning
 of each ordinary subroutine call.
 
-=item No B<-e> allowed in setuid scripts
-
-(F) A setuid script can't be specified by the user.
-
 =item No error file after 2> or 2>> on command line
 
 (F) An error peculiar to VMS.  Perl handles its own command line
@@ -2918,11 +2916,6 @@ matching counterpart. See L<perlfunc/pack>.
 redirection, and found a '<' on the command line, but can't find the
 name of the file from which to read data for stdin.
 
-=item No #! line
-
-(F) The setuid emulator requires that scripts have a well-formed #! line
-even on machines that don't support the #! construct.
-
 =item No next::method '%s' found for %s
 
 (F) C<next::method> found no further instances of this method name
@@ -3032,12 +3025,6 @@ find out what kind of ref it really was.  See L<perlref>.
 a reference to something else instead.  You can use the ref() function
 to find out what kind of ref it really was.  See L<perlref>.
 
-=item Not a perl script
-
-(F) The setuid emulator requires that scripts have a well-formed #! line
-even on machines that don't support the #! construct.  The line must
-mention perl.
-
 =item Not a SCALAR reference
 
 (F) Perl was trying to evaluate a reference to a scalar value, but found
@@ -3958,30 +3945,21 @@ expression, prepend zeroes to make it three digits long: C<\007>
 The <-- HERE shows in the regular expression about where the problem was
 discovered.
 
-=item Reference to nonexistent or unclosed group in regex; marked by <-- HERE in m/%s/
-
-(F) You used something like C<\g{-7}> in your regular expression, but there
-are not at least seven sets of closed capturing parentheses in the
-expression before where the C<\g{-7}> was located.
-
-The <-- HERE shows in the regular expression about where the problem was
-discovered.
-
 =item Reference to nonexistent named group in regex; marked by <-- HERE in m/%s/
 
 (F) You used something like C<\k'NAME'> or C<< \k<NAME> >> in your regular
-expression, but there is no corresponding named capturing parentheses such
-as C<(?'NAME'...)> or C<(?<NAME>...). Check if the name has been spelled
-correctly both in the backreference and the declaration.
+expression, but there is no corresponding named capturing parentheses
+such as C<(?'NAME'...)> or C<< (?<NAME>...) >>. Check if the name has been
+spelled correctly both in the backreference and the declaration.
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.
 
-=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in m/%s/
+=item Reference to nonexistent or unclosed group in regex; marked by <-- HERE in m/%s/
 
-(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
-most likely cause of this error is that you left out a parenthesis inside
-of the C<....> part.
+(F) You used something like C<\g{-7}> in your regular expression, but there
+are not at least seven sets of closed capturing parentheses in the
+expression before where the C<\g{-7}> was located.
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.
@@ -4011,7 +3989,7 @@ are meaningless.
 =item Reversed %s= operator
 
 (W syntax) You wrote your assignment operator backwards.  The = must
-always comes last, to avoid ambiguity with subsequent unary operators.
+always come last, to avoid ambiguity with subsequent unary operators.
 
 =item rewinddir() attempted on invalid dirhandle %s
 
@@ -4076,16 +4054,16 @@ C<foo ? 0 : 1>) leading to some ambiguous constructions being wrongly
 parsed. One way to disambiguate the parsing is to put parentheses around
 the conditional expression, i.e. C<(foo) ? 0 : 1>.
 
-=item %sseek() on unopened filehandle
-
-(W unopened) You tried to use the seek() or sysseek() function on a
-filehandle that was either never opened or has since been closed.
-
 =item seekdir() attempted on invalid dirhandle %s
 
 (W io) The dirhandle you are doing a seekdir() on is either closed or not
 really a dirhandle.  Check your control flow.
 
+=item %sseek() on unopened filehandle
+
+(W unopened) You tried to use the seek() or sysseek() function on a
+filehandle that was either never opened or has since been closed.
+
 =item select not implemented
 
 (F) This machine doesn't implement the select() system call.
@@ -4151,12 +4129,12 @@ L<perlre>.
 
 =item Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/%s/
 
-(F) If the contents of a (?{...}) clause contains braces, they must balance
-for Perl to properly detect the end of the clause. The <-- HERE shows in
+(F) If the contents of a (?{...}) clause contain braces, they must balance
+for Perl to detect the end of the clause properly. The <-- HERE shows in
 the regular expression about where the problem was discovered. See
 L<perlre>.
 
-=item "500 Server error"
+=item Z<>500 Server error
 
 See Server error.
 
@@ -4220,16 +4198,6 @@ didn't think so.
 forget to check the return value of your socket() call?  See
 L<perlfunc/setsockopt>.
 
-=item Setuid/gid script is writable by world
-
-(F) The setuid emulator won't run a script that is writable by the
-world, because the world might have written on it already.
-
-=item Setuid script not plain file
-
-(F) The setuid emulator won't run a script that isn't read from a file,
-but from a socket, a pipe or another device.
-
 =item shm%s not implemented
 
 (F) You don't have System V shared memory IPC on your system.
@@ -4355,7 +4323,7 @@ assignment or as a subroutine argument for example).
 
 =item sv_upgrade from type %d down to type %d
 
-(P) Perl tried to force the upgrade an SV to a type which was actually
+(P) Perl tried to force the upgrade of an SV to a type which was actually
 inferior to its current type.
 
 =item Switch (?(condition)... contains too many branches in regex; marked by <-- HERE in m/%s/
@@ -4372,16 +4340,16 @@ discovered. See L<perlre>.
 
 =item Switch condition not recognized in regex; marked by <-- HERE in m/%s/
 
-(F) If the argument to the (?(...)if-clause|else-clause) construct is a
-number, it can be only a number. The <-- HERE shows in the regular expression
-about where the problem was discovered. See L<perlre>.
+(F) If the argument to the (?(...)if-clause|else-clause) construct is
+a number, it can be only a number. The <-- HERE shows in the regular
+expression about where the problem was discovered. See L<perlre>.
 
 =item switching effective %s is not implemented
 
 (F) While under the C<use filetest> pragma, we cannot switch the real
 and effective uids or gids.
 
-=item %s syntax
+=item %s syntax OK
 
 (F) The final summary message when a C<perl -c> succeeds.
 
@@ -4449,16 +4417,16 @@ know about your kind of stdio.  You'll have to use a filename instead.
 (F) You tried to use C<goto> to reach a label that was too deeply nested
 for Perl to reach.  Perl is doing you a favor by refusing.
 
-=item tell() on unopened filehandle
-
-(W unopened) You tried to use the tell() function on a filehandle that
-was either never opened or has since been closed.
-
 =item telldir() attempted on invalid dirhandle %s
 
 (W io) The dirhandle you tried to telldir() is either closed or not really
 a dirhandle.  Check your control flow.
 
+=item tell() on unopened filehandle
+
+(W unopened) You tried to use the tell() function on a filehandle that
+was either never opened or has since been closed.
+
 =item That use of $[ is unsupported
 
 (F) Assignment to C<$[> is now strictly circumscribed, and interpreted
@@ -4711,6 +4679,17 @@ reserved for internal use; so, applications shouldn't attempt to exchange
 them.  If you know what you are doing you can turn
 off this warning by C<no warnings 'utf8';>.
 
+=item Unicode surrogate U+%X is illegal in UTF-8
+
+(W utf8) You had a UTF-16 surrogate in a context where they are
+not considered acceptable.  These code points, between U+D800 and
+U+DFFF (inclusive), are used by Unicode only for UTF-16.  However, Perl
+internally allows all unsigned integer code points (up to the size limit
+available on your platform), including surrogates.  But these can cause
+problems when being input or output, which is likely where this message
+came from.  If you really really know what you are doing you can turn
+off this warning by C<no warnings 'utf8';>.
+
 =item Unknown BYTEORDER
 
 (F) There are no byte-swapping functions for a machine with this byte
@@ -4745,11 +4724,17 @@ subvert Perl's population of %ENV for nefarious purposes.
 =item Unknown switch condition (?(%s in regex; marked by <-- HERE in m/%s/
 
 (F) The condition part of a (?(condition)if-clause|else-clause) construct
-is not known. The condition may be lookahead or lookbehind (the condition
-is true if the lookahead or lookbehind is true), a (?{...})  construct (the
-condition is true if the code evaluates to a true value), or a number (the
-condition is true if the set of capturing parentheses named by the number
-matched).
+is not known. The condition must be one of the following:
+
+  (1) (2) ...        true if 1st, 2nd, etc., capture matched
+  (<NAME>) ('NAME')  true if named capture matched
+  (?=...) (?<=...)   true if subpattern matches
+  (?!...) (?<!...)   true if subpattern fails to match
+  (?{ CODE })        true if code returns a true value
+  (R)                true if evaluating inside recursion
+  (R1) (R2) ...      true if directly inside capture group 1, 2, etc.
+  (R&NAME)           true if directly inside named capture
+  (DEFINE)           always false; for defining named subpatterns
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.  See L<perlre>.
@@ -4764,21 +4749,20 @@ of the C<-C> switch for the list of known options.
 (F) You specified an unknown Unicode option.  See L<perlrun> documentation
 of the C<-C> switch for the list of known options.
 
-=item Unknown warnings category '%s'
-
-(F) An error issued by the C<warnings> pragma. You specified a warnings
-category that is unknown to perl at this point.
-
-Note that if you want to enable a warnings category registered by a module
-(e.g. C<use warnings 'File::Find'>), you must have imported this module
-
 =item Unknown verb pattern '%s' in regex; marked by <-- HERE in m/%s/
 
 (F) You either made a typo or have incorrectly put a C<*> quantifier
 after an open brace in your pattern.  Check the pattern and review
 L<perlre> for details on legal verb patterns.
 
-first.
+=item Unknown warnings category '%s'
+
+(F) An error issued by the C<warnings> pragma. You specified a warnings
+category that is unknown to perl at this point.
+
+Note that if you want to enable a warnings category registered by a
+module (e.g. C<use warnings 'File::Find'>), you must have loaded this
+module first.
 
 =item unmatched [ in regex; marked by <-- HERE in m/%s/
 
@@ -4901,16 +4885,6 @@ character to get your parentheses to balance.  See L<attributes>.
 compressed integer format and could not be converted to an integer.
 See L<perlfunc/pack>.
 
-=item Unterminated verb pattern in regex; marked by <-- HERE in m/%s/
-
-(F) You used a pattern of the form C<(*VERB)> but did not terminate
-the pattern with a C<)>. Fix the pattern and retry.
-
-=item Unterminated verb pattern argument in regex; marked by <-- HERE in m/%s/
-
-(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
-the pattern with a C<)>. Fix the pattern and retry.
-
 =item Unterminated \g{...} pattern in regex; marked by <-- HERE in m/%s/
 
 (F) You missed a close brace on a \g{..} pattern (group reference) in
@@ -4923,6 +4897,16 @@ a term, so it's looking for the corresponding right angle bracket, and
 not finding it.  Chances are you left some needed parentheses out
 earlier in the line, and you really meant a "less than".
 
+=item Unterminated verb pattern argument in regex; marked by <-- HERE in m/%s/
+
+(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
+the pattern with a C<)>. Fix the pattern and retry.
+
+=item Unterminated verb pattern in regex; marked by <-- HERE in m/%s/
+
+(F) You used a pattern of the form C<(*VERB)> but did not terminate
+the pattern with a C<)>. Fix the pattern and retry.
+
 =item untie attempted while %d inner references still exist
 
 (W untie) A copy of the object returned from C<tie> (or C<tied>) was
@@ -5090,15 +5074,6 @@ error, so C<:=> can be reclaimed as a new operator in the future.
 If you need an empty attribute list, for example in a code generator, add
 a space before the C<=>.
 
-=item Use of ?PATTERN? without explicit operator is deprecated
-
-(D deprecated) You have written something like C<?\w?>, for a regular
-expression that matches only once.  Starting this term directly with
-the question mark delimiter is now deprecated, so that the question mark
-will be available for use in new operators in the future.  Write C<m?\w?>
-instead, explicitly using the C<m> operator: the question mark delimiter
-still invokes match-once behaviour.
-
 =item Use of freed value in iteration
 
 (F) Perhaps you modified the iterated array within the loop?
@@ -5130,11 +5105,11 @@ scope is deprecated and should be avoided.
 
 =item Use of inherited AUTOLOAD for non-method %s() is deprecated
 
-(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines
-are looked up as methods (using the C<@ISA> hierarchy) even when the
-subroutines to be autoloaded were called as plain functions (e.g.
-C<Foo::bar()>), not as methods (e.g. C<< Foo->bar() >> or C<<
-$obj->bar() >>).
+(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD>
+subroutines are looked up as methods (using the C<@ISA> hierarchy)
+even when the subroutines to be autoloaded were called as plain
+functions (e.g. C<Foo::bar()>), not as methods (e.g. C<< Foo->bar() >> or
+C<< $obj->bar() >>).
 
 This bug will be rectified in future by using method lookup only for
 methods' C<AUTOLOAD>s.  However, there is a significant base of existing
@@ -5163,6 +5138,12 @@ only C.  This usually means there's a better way to do it in Perl.
 generally because there's a better way to do it, and also because the
 old way has bad side effects.
 
+=item Use of -l on filehandle %s
+
+(W io) A filehandle represents an opened file, and when you opened the file
+it already went past any symlink you are presumably trying to look for.
+The operation returned C<undef>.  Use a filename instead.
+
 =item Use of %s on a handle without * is deprecated
 
 (D deprecated) You used C<tie>, C<tied> or C<untie> on a scalar but that
@@ -5175,18 +5156,14 @@ there is currently no way to tie the scalar itself when it holds
 a typeglob, and no way to untie a scalar that has had a typeglob
 assigned to it.
 
-=item Use of -l on filehandle %s
-
-(W io) A filehandle represents an opened file, and when you opened the file
-it already went past any symlink you are presumably trying to look for.
-The operation returned C<undef>.  Use a filename instead.
-
-=item Use of "package" with no arguments is deprecated
+=item Use of ?PATTERN? without explicit operator is deprecated
 
-(D deprecated) You used the C<package> keyword without specifying a package
-name. So no namespace is current at all. Using this can cause many
-otherwise reasonable constructs to fail in baffling ways. C<use strict;>
-instead.
+(D deprecated) You have written something like C<?\w?>, for a regular
+expression that matches only once.  Starting this term directly with
+the question mark delimiter is now deprecated, so that the question mark
+will be available for use in new operators in the future.  Write C<m?\w?>
+instead, explicitly using the C<m> operator: the question mark delimiter
+still invokes match-once behaviour.
 
 =item Use of qw(...) as parentheses is deprecated
 
@@ -5207,7 +5184,7 @@ to be huge numbers, and so usually indicates programmer error.
 
 If you really do mean it, explicitly numify your reference, like so:
 C<$array[0+$ref]>.  This warning is not given for overloaded objects,
-either, because you can overload the numification and stringification
+however, because you can overload the numification and stringification
 operators and then you presumably know what you are doing.
 
 =item Use of reserved word "%s" is deprecated
@@ -5255,13 +5232,6 @@ C<< @foo->[23] >> or C<< @$ref->[99] >>.  Versions of perl <= 5.6.1 used to
 allow this syntax, but shouldn't have. It is now deprecated, and will be
 removed in a future version.
 
-=item Using !~ with %s doesn't make sense
-
-(F) Using the C<!~> operator with C<s///r>, C<tr///r> or C<y///r> is
-currently reserved for future use, as the exact behaviour has not
-been decided. (Simply returning the boolean opposite of the
-modified string is usually not particularly useful.)
-
 =item Using just the first character returned by \N{} in character class
 
 (W) A charnames handler may return a sequence of more than one character.
@@ -5270,13 +5240,18 @@ expression pattern bracketed character class.
 
 =item Using just the first characters returned by \N{}
 
-(W) A charnames handler may return a sequence of characters.  There is a finite
-limit as to the number of characters that can be used, which this sequence
-exceeded.  In the message, the characters in the sequence are separated by
-dots, and each is shown by its ordinal in hex.  Anything to the left of the
-C<HERE> was retained; anything to the right was discarded.
+(W) A charnames handler may return a sequence of characters.  There is a
+finite limit as to the number of characters that can be used, which this
+sequence exceeded.  In the message, the characters in the sequence are
+separated by dots, and each is shown by its ordinal in hex.  Anything to
+the left of the C<HERE> was retained; anything to the right was discarded.
 
-=item Unicode surrogate U+%X is illegal in UTF-8
+=item Using !~ with %s doesn't make sense
+
+(F) Using the C<!~> operator with C<s///r>, C<tr///r> or C<y///r> is
+currently reserved for future use, as the exact behaviour has not
+been decided. (Simply returning the boolean opposite of the
+modified string is usually not particularly useful.)
 
 =item UTF-16 surrogate U+%X
 
@@ -5350,11 +5325,11 @@ known at compile time.  See L<perlre>.
 
 =item "%s" variable %s masks earlier declaration in same %s
 
-(W misc) A "my", "our" or "state" variable has been redeclared in the current
-scope or statement, effectively eliminating all access to the previous
-instance.  This is almost always a typographical error.  Note that the
-earlier variable will still exist until the end of the scope or until
-all closure referents to it are destroyed.
+(W misc) A "my", "our" or "state" variable has been redeclared in the
+current scope or statement, effectively eliminating all access to the
+previous instance.  This is almost always a typographical error.  Note
+that the earlier variable will still exist until the end of the scope
+or until all closure referents to it are destroyed.
 
 =item Variable syntax
 
@@ -5444,7 +5419,7 @@ filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
 
 (F) The count in the (un)pack template may be replaced by C<[TEMPLATE]> only if
 C<TEMPLATE> always matches the same amount of packed bytes that can be
-determined from the template alone. This is not possible if it contains an
+determined from the template alone. This is not possible if it contains any
 of the codes @, /, U, u, w or a *-length. Redesign the template.
 
 =item write() on closed filehandle %s