Author: larry
Date: Thu Oct  5 11:16:58 2006
New Revision: 12736

Modified:
   doc/trunk/design/syn/S04.pod

Log:
Removed hash composers from line-ending curly rule entirely.  Now a parsefail.


Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod        (original)
+++ doc/trunk/design/syn/S04.pod        Thu Oct  5 11:16:58 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 19 Aug 2004
-  Last Modified: 26 Sep 2006
+  Last Modified: 5 Sep 2006
   Number: 4
-  Version: 41
+  Version: 42
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -138,11 +138,14 @@
         sub { 3 }   # the statement won't terminate here 
     ];
 
-However, a nested hash block must be disambiguated by a trailing comma:
+However, a hash composer may never occur at the end of a line.  If the
+parser sees anything that looks like a hash composer at the end of
+the line, it fails with "closing hash curly may not terminate line"
+or some such.
 
-    # Without the trailing comma, this becomes a code block
     my $hash = {
-        1 => { 2 => 3, 4 => 5 },
+        1 => { 2 => 3, 4 => 5 },  # OK
+        2 => { 6 => 7, 8 => 9 }          # ERROR
     };
 
 Because subroutine declarations are expressions, not statements,

Reply via email to