X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=65cde01c35ced50d6c75465ec9491d04a125c194;hb=e5dd39fcc65538f6d292cb5228105f85fe9eff3e;hp=de8956be94a68963caaee9301b7fa69787349cfd;hpb=c4ea979ceac56664f1fc8fd2d684b3f750ba2c82;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index de8956b..65cde01 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -72,7 +72,7 @@ Alternatively, you can import the subroutine (or pretend that it's imported with the C pragma). To silently interpret it as the Perl operator, use the C prefix -on the operator (e.g. C) or by declaring the subroutine +on the operator (e.g. C) or declare the subroutine to be an object method (see L or L). @@ -112,8 +112,8 @@ which 'splits' output into two streams, such as =item Applying %s to %s will act on scalar(%s) -(W misc) The pattern match (//), substitution (s///), and -transliteration (tr///) operators work on scalar values. If you apply +(W misc) The pattern match (C), substitution (C), and +transliteration (C) 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 @@ -184,7 +184,7 @@ know which context to supply to the right side. =item Negative offset to vec in lvalue context -(F) When vec is called in an lvalue context, the second argument must be +(F) When C is called in an lvalue context, the second argument must be greater than or equal to zero. =item Attempt to bless into a reference @@ -270,7 +270,7 @@ S. =item Bad evalled substitution pattern -(F) You've used the /e switch to evaluate the replacement for a +(F) You've used the C 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 '}'. @@ -1106,16 +1106,6 @@ and so on) and not for Unicode characters, so Perl behaved as if you meant If you actually want to pack Unicode codepoints, use the C<"U"> format instead. -=item chmod() mode argument is missing initial 0 - -(W chmod) A novice will sometimes say - - chmod 777, $filename - -not realizing that 777 will be interpreted as a decimal number, -equivalent to 01411. Octal constants are introduced with a leading 0 in -Perl, as in C. - =item close() on unopened filehandle %s (W unopened) You tried to close a filehandle that was never opened. @@ -1247,6 +1237,12 @@ it compiled correctly and ran its initialization code correctly. It's traditional to end such a file with a "1;", though any true value would do. See L. +=item (Did you mean 0%d instead?) + +(W octmode) The mode argument to chmod, mkdir, and umask is usually +given in octal (octal constants start with a 0, as in C). Did you really +mean to use a non-octal number? + =item (Did you mean &%s instead?) (W) You probably referred to an imported subroutine &FOO as $FOO or some @@ -2207,6 +2203,12 @@ not know about the field name. The field names are looked up in the not recognized. Say C in your shell to see the valid signal names on your system. +=item Non-octal literal mode (%d) specified + +(W octmode) The mode argument to chmod, mkdir, and umask is usually +given in octal (octal constants start with a 0, as in C). Did you really +mean to use a non-octal number? + =item Not a CODE reference (F) Perl was trying to evaluate a reference to a code value (that is, a @@ -3497,11 +3499,6 @@ certain type. Arrays must be @NAME or C<@{EXPR}>. Hashes must be %NAME or C<%{EXPR}>. No implicit dereferencing is allowed--use the {EXPR} forms as an explicit dereference. See L. -=item umask: argument is missing initial 0 - -(W umask) A umask of 222 is incorrect. It should be 0222, because octal -literals always start with 0 in Perl, as in C. - =item umask not implemented (F) Your machine doesn't implement the umask function and you tried to @@ -3871,6 +3868,13 @@ In code that currently says C you should remove AutoLoader from @ISA and change C to C. +=item Use of "package" with no arguments is deprecated + +(D deprecated) You used the C 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 +instead. + =item Use of %s in printf format not supported (F) You attempted to use a feature of printf that is accessible from @@ -3930,16 +3934,17 @@ program. =item Using a hash as a reference is deprecated -(D deprecated) You tried to use a hash as a reference, as in C<%foo->{"bar"}> -or C<%$ref->{"hello"}. 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. +(D deprecated) You tried to use a hash as a reference, as in +C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. 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 an array as a reference is deprecated -(D deprecated) You tried to use an array as a reference, as in 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. +(D deprecated) You tried to use an array as a reference, as in +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 Value of %s can be "0"; test with defined() @@ -4104,8 +4109,8 @@ Use a filename instead. (F) And you probably never will, because you probably don't have the sources to your kernel, and your vendor probably doesn't give a rip -about what you want. Your best bet is to use the wrapsuid script in the -eg directory to put a setuid C wrapper around your script. +about what you want. Your best bet is to put a setuid C wrapper around +your script. =item You need to quote "%s"