From: Nicholas Clark Date: Sun, 23 Dec 2007 12:28:53 +0000 (+0000) Subject: { my $a; } not warning about being used only once is a something X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=718140ec19bbd5ac75685b0182b0f943598db1ee;p=p5sagit%2Fp5-mst-13.2.git { my $a; } not warning about being used only once is a something TO be DOne. p4raw-id: //depot/perl@32716 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index f270d6b..8372b3c 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -662,6 +662,20 @@ also the warning messages (see L, C). These tasks would need C knowledge, and knowledge of how the interpreter works, or a willingness to learn. +=head2 lexicals used only once + +This warns: + + $ perl -we '$pie = 42' + Name "main::pie" used only once: possible typo at -e line 1. + +This does not: + + $ perl -we 'my $pie = 42' + +Logically all lexicals used only once should warn, if the user asks for +warnings. + =head2 UTF-8 revamp The handling of Unicode is unclean in many places. For example, the regexp