In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6b57d4bc7c6decb1bad066cc7ad2c1c63d6eb1d8?hp=7f8ad91f301ccedbd53eca8c8ae77acee7cb3700>

- Log -----------------------------------------------------------------
commit 6b57d4bc7c6decb1bad066cc7ad2c1c63d6eb1d8
Author: David Mitchell <[email protected]>
Date:   Mon Aug 15 11:39:11 2016 +0100

    "" . open(my $fh,...) gave wrong warning
    
    RT #128940
    
        $ perl -we 'print "" . open my $fh, "<", "no / such / file"'
        Use of uninitialized value $fh in concatenation (.) or string at -e 
line 1.
                               ^^^
-----------------------------------------------------------------------

Summary of changes:
 sv.c                   | 1 +
 t/lib/warnings/9uninit | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/sv.c b/sv.c
index b345052..8991c12 100644
--- a/sv.c
+++ b/sv.c
@@ -16243,6 +16243,7 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV 
*const uninit_sv,
             */
             break;
        }
+       match = 1;
        goto do_op;
 
     /* ops where $_ may be an implicit arg */
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit
index 7fbf442..5171941 100644
--- a/t/lib/warnings/9uninit
+++ b/t/lib/warnings/9uninit
@@ -2180,3 +2180,9 @@ undef $SIG{__WARN__};
 EXPECT
 ok
 Use of uninitialized value $a[140688675223280] in string at - line 15.
+########
+# RT #128940
+use warnings 'uninitialized';
+my $x = "" . open my $fh, "<", "no / such / file";
+EXPECT
+Use of uninitialized value in concatenation (.) or string at - line 3.

--
Perl5 Master Repository

Reply via email to