diff --git a/perl-5.27.1-perl-131597-ensure-the-GV-slot-is-filled-for-our-foo.patch b/perl-5.27.1-perl-131597-ensure-the-GV-slot-is-filled-for-our-foo.patch new file mode 100644 index 0000000..2d18cdb --- /dev/null +++ b/perl-5.27.1-perl-131597-ensure-the-GV-slot-is-filled-for-our-foo.patch @@ -0,0 +1,62 @@ +From 6091bd4ca4a4a4c9b6f8cadddb53c19b96748a04 Mon Sep 17 00:00:00 2001 +From: Tony Cook +Date: Mon, 19 Jun 2017 14:59:53 +1000 +Subject: [PATCH] (perl #131597) ensure the GV slot is filled for our [%$@]foo: + attr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + op.c | 6 +++--- + t/op/attrs.t | 18 ++++++++++++++++++ + 2 files changed, 21 insertions(+), 3 deletions(-) + +diff --git a/op.c b/op.c +index 1a2101c..c6b5ec7 100644 +--- a/op.c ++++ b/op.c +@@ -3826,9 +3826,9 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp) + PL_parser->in_my = FALSE; + PL_parser->in_my_stash = NULL; + apply_attrs(GvSTASH(gv), +- (type == OP_RV2SV ? GvSV(gv) : +- type == OP_RV2AV ? MUTABLE_SV(GvAV(gv)) : +- type == OP_RV2HV ? MUTABLE_SV(GvHV(gv)) : MUTABLE_SV(gv)), ++ (type == OP_RV2SV ? GvSVn(gv) : ++ type == OP_RV2AV ? MUTABLE_SV(GvAVn(gv)) : ++ type == OP_RV2HV ? MUTABLE_SV(GvHVn(gv)) : MUTABLE_SV(gv)), + attrs); + } + o->op_private |= OPpOUR_INTRO; +diff --git a/t/op/attrs.t b/t/op/attrs.t +index 2514270..649525c 100644 +--- a/t/op/attrs.t ++++ b/t/op/attrs.t +@@ -489,4 +489,22 @@ EOP + is($out, '', 'RT #3605: $a ? my $var : my $othervar is perfectly valid syntax'); + } + ++fresh_perl_is('sub dummy {} our $dummy : Dummy', < - 4:5.26.0-397 - Enable separate debuginfo back