From: Gurusamy Sarathy Date: Thu, 27 Apr 2000 17:41:22 +0000 (+0000) Subject: improved docs on the warn_uninit diagnostic (from David Glasser X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e5be4a530c8d1211967f2c5b0225e29f92276f4f;p=p5sagit%2Fp5-mst-13.2.git improved docs on the warn_uninit diagnostic (from David Glasser and Simon Cozens) p4raw-id: //depot/perl@5967 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 0196338..cb4be0e 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3546,6 +3546,14 @@ a package qualifier, e.g. C<&our()>, or C. defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. +To help you figure out what was undefined, perl tells you what operation +you used the undefined value in. Note, however, that perl optimizes your +program and the operation displayed in the warning may not necessarily +appear literally in your program. For example, C<"that $foo"> is +usually optimized into C<"that " . $foo>, and the warning will refer to +the C operator, even though there is no C<.> in your +program. + =item Value of %s can be "0"; test with defined() (W misc) In a conditional expression, you used , <*> (glob),