In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c4a33ecd3009146ea545628e3014a22c637b6bb1?hp=decea2297b3561540857fda67622f0c4a4df6099>

- Log -----------------------------------------------------------------
commit c4a33ecd3009146ea545628e3014a22c637b6bb1
Author: Aaron Crane <a...@cpan.org>
Date:   Tue Oct 21 18:38:27 2014 +0100

    [perl #123029]: add regression test
    
    This bug was fixed in c0683843e9299db25f354e2c8c90faa7614950d1.
-----------------------------------------------------------------------

Summary of changes:
 t/op/state.t | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/t/op/state.t b/t/op/state.t
index b4542e1..0e20057 100644
--- a/t/op/state.t
+++ b/t/op/state.t
@@ -9,7 +9,7 @@ BEGIN {
 
 use strict;
 
-plan tests => 136;
+plan tests => 137;
 
 # Before loading feature.pm, test it with CORE::
 ok eval 'CORE::state $x = 1;', 'CORE::state outside of feature.pm scope';
@@ -446,6 +446,14 @@ foreach my $forbidden (<DATA>) {
     thing2(6);
 }
 
+# [perl #123029] regression in "state" under PERL_NO_COW
+sub rt_123029 {
+    state $s;
+    $s = 'foo';
+    my $c = $s;
+    return defined $s;
+}
+ok(rt_123029(), "state variables don't surprisingly disappear when accessed");
 
 __DATA__
 state ($a) = 1;

--
Perl5 Master Repository

Reply via email to