From: Rafael Garcia-Suarez Date: Fri, 6 Jun 2003 22:50:37 +0000 (+0000) Subject: Complement to change #19698 : X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d66e832e9fab8b58efc050fa203ce5c595e586b3;p=p5sagit%2Fp5-mst-13.2.git Complement to change #19698 : add also this information (=> and curly braces doesn't quote compound identifiers) to the strict manpage. As an experiment in documentation, add a "HISTORY" section to the strict manpage. p4raw-link: @19698 on //depot/perl: 695ff5bd5c58ec45a757946fd60f1420702ba4b6 p4raw-id: //depot/perl@19701 --- diff --git a/lib/strict.pm b/lib/strict.pm index 591fa39..1a9a259 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -85,7 +85,7 @@ is allowed so that C would not break under stricture. =item C This generates a compile-time error if you access a variable that wasn't -declared via "our" or C, +declared via C or C, localized via C, or wasn't fully qualified. Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local() variable isn't good enough. See L and @@ -110,18 +110,22 @@ exempted from this check. This disables the poetry optimization, generating a compile-time error if you try to use a bareword identifier that's not a subroutine, unless it -appears in curly braces or on the left hand side of the "=E" symbol. - +is a simple identifier (no colons) and that it appears in curly braces or +on the left hand side of the C<< => >> symbol. use strict 'subs'; $SIG{PIPE} = Plumber; # blows up $SIG{PIPE} = "Plumber"; # just fine: bareword in curlies always ok $SIG{PIPE} = \&Plumber; # preferred form - - =back See L. +=head1 HISTORY + +C, with perl 5.6.1, erroneously permitted to use an unquoted +compound identifier (e.g. C) as a hash key (before C<< => >> or +inside curlies), but without forcing it always to a literal string. + =cut