On Fri 01 Nov, Michael Lazzaro wrote:
> 
>    (heredocs)   - [exact format unknown; probably as perl5]
> 

There are comments by Larry in Appo 2 wrt RFCs 111 and 162.

Appo 2:
=======

    111  aaa  Here Docs Terminators (Was Whitespace and Here Docs)
    162  abb  Heredoc Contents

RFC 111: Here Docs Terminators (Was Whitespace and Here Docs)
Fine.

RFC 162: Heredoc contents
I think I like option (e) the best: remove whitespace equivalent to the
terminator.

By default, if it has to dwim, it should dwim assuming that hard tabs
are 8 spaces wide.  This should not generally pose a problem, since
most of the time the tabbing will be consistent throughout anyway, and
no dwimming will be necessary.  This puts the onus on people using
nonstandard tabs to make sure they're consistent so that Perl doesn't
have to guess.

Any additional mangling can easily be accomplished by a user-defined
operator.

RFC111:
=======

Perl6 should ignore any whitespace before the terminator of a heredoc on any
line.  Further it should ignore any whitespace ";"s (and comments) that
follow the terminator.  Perl should also ignore whitespace between the << and
the terminator.  

Discussion took place on allowing statements following the terminator, but
generally these where thought of as a bad idea.  So only ";" and comments
should occour on the same line.

      All of these should work:
      
      print <<EOL;
EOL
      print << EOL;
   EOL
      print << EOL;
   EOL;
      print << EOL
   EOL;
      print <<EOL ;
EOL     # this is the end of the here doc
      print <<EOL
EOL;    # this is the end of the here doc
      print <<EOL ;
EOL;    # this is the end of the here doc

      But this should be an error:
      
      print <<EOL
      EOL; $i++;


RFC162: 
=======
e) Remove whitespace equialent to the terminator - a realistic option. This
takes the whitespace off the content equivalent to that on the terminator and
removes that amount of whitespace from the content.

Though this behaviour might be associated with an enhanced Heredoc '<<<'
both had been proposed in the RFC, even though I edited the RFC I am not
sure quite what was agreed.

Richard

-- 
Personal     [EMAIL PROTECTED]            http://www.waveney.org
Telecoms     [EMAIL PROTECTED]  http://www.WaveneyConsulting.com
Web services [EMAIL PROTECTED]            http://www.wavwebs.com
Independent Telecomms Specialist, ATM expert, Web Analyst & Services

Reply via email to