Front page | perl.perl5.porters |
Postings from November 2016
Re: Indented here docs?
Thread Previous
|
Thread Next
From:
wolfsage
Date:
November 13, 2016 09:55
Subject:
Re: Indented here docs?
Message ID:
CAJ0K8bhADDTW1Y3L6t2oha6MwJBS=hk=5b_zGJ4L=MuMAnwF=w@mail.gmail.com
On Sat, Nov 12, 2016 at 3:38 PM, David Nicol <davidnicol@gmail.com> wrote:
> Should the tests put a newline after the literal "EOF" token instead
> of just ending the file there? Does fresh_perl_is take care of that?
No, you're right, I've updated the tests to account for this.
>
> Also, does the empty delimiter still work when there's nothing else
> printable on the line, like so? Or with an explicitly empty delimiter
> ? Because that's occasionally useful.
>
> print <<
> Hi
>
> __END__
>
> print << ''
> Hi
>
> __END__
>
This syntax is deprecated:
print <<
Hi
__END__
But you can do <<"", <<'', <<~"", <<~''. I've added test cases for
these as well.
Thanks!
-- Matthew Horsfall (alh)
Thread Previous
|
Thread Next