Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread Perl6
it's not so difficult, really. you just gotta know the trick:

- cd into the repository you want, then run "git am".
- Use your mail client's "view source" function (ctrl-u in thunderbird
for example).
- copy the complete mail source including headers
- paste it into the terminal that's running git am
- hit return if necessary, and ctrl-d

done.

I pushed the patch to our repository. Thanks for your work, francois!
  - Timo


Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread franc...@avalenn.eu
On Thu, Dec 01, 2016 at 10:15:03AM -0500, Will Coleda wrote:
> This will be much more likely to be applied if you provide a pull
> request to the repo at https://github.com/perl6/doc

I agree but it was a lot simpler for me to send it by e-mail at the moment.
I will perhaps try to make a pull-request when I have time and access
at the same time.


Re: [PATCH] multiple heredoc beginning in the same line

2016-12-02 Thread franc...@avalenn.eu
On Thu, Dec 01, 2016 at 10:46:17AM -0600, andy_b...@wiwb.uscourts.gov wrote:
> Hmm:
> $ cat /tmp/here.pl6
> my ($first, $second) = qq:to/END1/, qq:to/END2/;
>   FIRST
>   MULTILINE
>   STRING
>   END1
>SECOND
>MULTILINE
>STRING
>END2
> say "f: $first, s: $second";
> 
> $ perl6 /tmp/here.pl6
> f: FIRST
> MULTILINE
> STRING
> , s: SECOND
> MULTILINE
> STRING
> 
> 
> I'd expected $second to have both strings, as its here doc seems to start 
> at "FIRST" and go to END2 ... or am I misreading this?

Freely rephrasing POSIX[1] to adapt it to Perl6 the description could
beĀ :

The first here-document begins after the next  and
continues until there is a line containing only the delimiter
(possibly preceded by spaces) followed immediately by a ,
Then the next here-document starts, if there is one.

So it is expected that $second does not include $first.

[1]: 
http://pubs.opengroup.org/onlinepubs/007904875/utilities/xcu_chap02.html#tag_02_07_04


Re: [PATCH] multiple heredoc beginning in the same line

2016-12-01 Thread Will Coleda
This will be much more likely to be applied if you provide a pull
request to the repo at https://github.com/perl6/doc

On Wed, Nov 30, 2016 at 10:31 AM,   wrote:
> This is to document the fact that, as in POSIX shell, you can use
> multiple HEREDOC strings in the same line.
>
> ---
>  doc/Language/quoting.pod6 | 14 ++
>  1 file changed, 14 insertions(+)
>
> diff --git a/doc/Language/quoting.pod6 b/doc/Language/quoting.pod6
> index f7fe658..393807b 100644
> --- a/doc/Language/quoting.pod6
> +++ b/doc/Language/quoting.pod6
> @@ -386,6 +386,20 @@ would produce:
>file "db.7.3.8";
>};
>
> +You can begin multiple Heredocs in the same line.
> +
> +=begin code
> +my ($first, $second) = qq:to/END1/, qq:to/END2/;
> +  FIRST
> +  MULTILINE
> +  STRING
> +  END1
> +   SECOND
> +   MULTILINE
> +   STRING
> +   END2
> +=end code
> +
>  =head1 Regexes
>
>  For information about quoting as applied in regexes see the L --
> 2.9.3



-- 
Will "Coke" Coleda