In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/08b2a930f16c631ad58d4ec6d184e81c0a4ec7b6?hp=4276fd3639b8e3fdebe28a2eb81d455f0f33fd05>

- Log -----------------------------------------------------------------
commit 08b2a930f16c631ad58d4ec6d184e81c0a4ec7b6
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 2 10:01:43 2012 -0700

    perldelta for unterminated here-docs

M       pod/perldelta.pod

commit 6f2d7fc9985768a64278f137e02957c70004834d
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 2 09:52:27 2012 -0700

    [perl #114104] Better error for unterminated heredoc delim

M       pod/perldiag.pod
M       t/lib/croak/toke
M       toke.c

commit 70306497846f7e53e9b28c68000cd89aff8ca5ee
Author: Father Chrysostomos <[email protected]>
Date:   Wed Aug 1 22:36:48 2012 -0700

    perldelta for #114340

M       pod/perldelta.pod

commit 63870e6db700a7d6e2604ffdda38f76a4648769a
Author: Father Chrysostomos <[email protected]>
Date:   Wed Aug 1 22:31:15 2012 -0700

    perldelta for Storable and vstrings

M       pod/perldelta.pod

commit e7d41eaa9308a026ccfa238820259ddd167b53a7
Author: Father Chrysostomos <[email protected]>
Date:   Wed Aug 1 22:03:34 2012 -0700

    perldelta for given aliasing $_

M       pod/perldelta.pod
-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod |   25 ++++++++++++++++++++++++-
 pod/perldiag.pod  |   12 ++++++++++++
 t/lib/croak/toke  |    5 +++++
 toke.c            |    5 +++--
 4 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index be42f56..1cf5a88 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -61,6 +61,13 @@ C<utf8::downgrade> works, that result is used; otherwise, 
the equivalent of
 C<utf8::encode> is used, and a warning is issued about wide characters
 (L</Diagnostics>).
 
+=head2 C<given> now aliases the global $_
+
+Instead of assigning to an implicit lexical $_, C<given> now makes the
+global $_ an alias for its argument, just like C<foreach>.  However, it
+still uses lexical $_ if there is lexical $_ in scope (again, just like
+C<foreach>).
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -122,6 +129,12 @@ not changed.
 L<B::Deparse> has been upgraded from version 1.15 to 1.16.  It now deparses
 loop controls with the correct precedence.
 
+=item *
+
+L<Storable> has been upgraded from version 2.37 to 2.38.  It can now freeze
+and thaw vstrings correctly.  This causes a slight incompatible change in
+the storage format, so the format version has increased to 2.9.
+
 =back
 
 =head2 Removed Modules and Pragmata
@@ -201,7 +214,12 @@ the warning "Wide character in setenv".
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<Unterminated delimiter for here document|perldiag/"Unterminated delimiter 
for here document">
+
+This message now occurs when a here document label has an initial quotation 
mark but the final quotation mark is missing.
+
+This replaces a bogus and misleading error message about not finding the
+label itself [perl #114104].
 
 =back
 
@@ -402,6 +420,11 @@ mismatch warnings from omitting the sub name.
 
 C<undef> on a subroutine now clears call checkers.
 
+=item *
+
+The C<ref> operator started leaking memory on blessed objects in Perl
+5.16.0.  This has been fixed [perl #114340].
+
 =back
 
 =head1 Known Problems
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 327f392..536764d 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -5203,6 +5203,18 @@ character to get your parentheses to balance.  See 
L<attributes>.
 compressed integer format and could not be converted to an integer.
 See L<perlfunc/pack>.
 
+=item Unterminated delimiter for here document
+
+(F) This message occurs when a here document label has an initial
+quotation mark but the final quotation mark is missing.  Perhaps
+you wrote:
+
+    <<"foo
+
+instead of:
+
+    <<"foo"
+
 =item Unterminated \g{...} pattern in regex; marked by <-- HERE in m/%s/
 
 (F) You missed a close brace on a \g{..} pattern (group reference) in
diff --git a/t/lib/croak/toke b/t/lib/croak/toke
index 130659a..7ab5a4d 100644
--- a/t/lib/croak/toke
+++ b/t/lib/croak/toke
@@ -3,3 +3,8 @@ __END__
 my sub;
 EXPECT
 Missing name in "my sub" at - line 1.
+########
+# NAME Unterminated delimiter for here document
+<<"foo
+EXPECT
+Unterminated delimiter for here document at - line 1.
diff --git a/toke.c b/toke.c
index 19fa195..c65aecf 100644
--- a/toke.c
+++ b/toke.c
@@ -9447,9 +9447,10 @@ S_scan_heredoc(pTHX_ register char *s)
        s = peek;
        term = *s++;
        s = delimcpy(d, e, s, PL_bufend, term, &len);
+       if (s == PL_bufend)
+           Perl_croak(aTHX_ "Unterminated delimiter for here document");
        d += len;
-       if (s < PL_bufend)
-           s++;
+       s++;
     }
     else {
        if (*s == '\\')

--
Perl5 Master Repository

Reply via email to