develooper Front page | perl.perl5.porters | Postings from August 2012

[perl #65838] heredoc terminators need a newline

Thread Previous
From:
Father Chrysostomos via RT
Date:
August 18, 2012 23:43
Subject:
[perl #65838] heredoc terminators need a newline
Message ID:
rt-3.6.HEAD-11172-1345358622-1483.65838-15-0@perl.org
On Wed May 20 03:48:41 2009, nicholas wrote:
> 
> This is a bug report for perl from nick@ccl4.org,
> generated with the help of perlbug 1.39 running under perl 5.11.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Note that there isn't a trailing newline:
> 
> $ diff -u /dev/null heredoc
> --- /dev/null   2009-05-17 19:56:29.343303490 +0100
> +++ heredoc     2009-05-20 11:41:47.000000000 +0100
> @@ -0,0 +1,4 @@
> +print <<'EOM'
> +This is a page about perl programming.
> +Or is it a page about SuperCollider programming?
> +EOM
> \ No newline at end of file
> $ ./perl heredoc
> Can't find string terminator "EOM" anywhere before EOF at heredoc line
>    1.
> 
> If I add the newline, all is well. perlop.pod says:
> 
>                         The terminating string must appear by itself
>     (unquoted and with no surrounding whitespace) on the terminating
>    line.
> 
> 
> It doesn't state there needs to be a newline, so I consider this to be
>    a bug.

And you reported the same bug 5 years earlier, as #30368, but it was
marked resolved (not rejected, for some reason), because it was not
considered a bug.

I still think it should be fixed.  I’m looking at David Nicol’s patch now.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=65838

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About