In perl.git, the branch topic/indented-here-docs has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ab1e6d7fc0bcb1d281a1e33e75d944ab8ef08e54?hp=c7abe651894378744f39c9b14083002a2c67d954>

- Log -----------------------------------------------------------------
commit ab1e6d7fc0bcb1d281a1e33e75d944ab8ef08e54
Author: Matthew Horsfall <wolfs...@gmail.com>
Date:   Sun Jul 10 19:19:59 2016 -0400

    Upgrade <<~EOF mismatched indentation warning to a fatal error.
-----------------------------------------------------------------------

Summary of changes:
 t/op/heredoc.t | 9 ++-------
 toke.c         | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/t/op/heredoc.t b/t/op/heredoc.t
index 97ced75..d6ea36b 100644
--- a/t/op/heredoc.t
+++ b/t/op/heredoc.t
@@ -163,9 +163,7 @@ HEREDOC
 
     fresh_perl_is(
         "print <<~EOF;\nx EOF\n\t \t${string}\n\t \tEOF\n",
-        "Indentation on line 1 of heredoc doesn\'t match delimiter at - line 
1.\n" .
-        "x EOF\n" .
-        $string,
+        "Indentation on line 1 of heredoc doesn\'t match delimiter at - line 
1.\n",
         { switches => ['-w'], stderr => 1 },
         "indented heredoc with embedded EOF lookalike"
     );
@@ -179,10 +177,7 @@ HEREDOC
 
     fresh_perl_is(
         "print <<~HEREDOC;\n ${string}\n$string\n   $string\n $string\n   
HEREDOC",
-        "Indentation on line 1 of heredoc doesn't match delimiter at - line 
1.\n" .
-        "Indentation on line 2 of heredoc doesn't match delimiter at - line 
1.\n" .
-        "Indentation on line 4 of heredoc doesn\'t match delimiter at - line 
1.\n" .
-        " some data\nsome data\nsome data\n some data",
+        "Indentation on line 1 of heredoc doesn't match delimiter at - line 
1.\n",
         { switches => ['-w'], stderr => 1 },
         "indented heredoc with bad indentation"
     );
diff --git a/toke.c b/toke.c
index 1eab71b..4cf04a3 100644
--- a/toke.c
+++ b/toke.c
@@ -9810,7 +9810,7 @@ S_scan_heredoc(pTHX_ char *s)
 
                ss += le;
 
-               Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX),
+               Perl_croak(aTHX_
                    "Indentation on line %d of heredoc doesn't match delimiter",
                     (int)linecount
                );

--
Perl5 Master Repository

Reply via email to