diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2002-10-01 02:54:30 -0700 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-10-02 14:15:22 +0000 |
commit | c754c3d7d306f3634bb3500e77dcb37c2c9892e2 (patch) | |
tree | b9522f873e7a752e1def6dbe709b1daf7e1aca2c | |
parent | d1573ac7f3669af3adf9935c83633459afbc51af (diff) | |
download | perl-c754c3d7d306f3634bb3500e77dcb37c2c9892e2.tar.gz |
Re: [perl #17376] Bug Report - our(%)
Message-ID: <GNdm9gzkgWOS092yn@efn.org>
p4raw-id: //depot/perl@17963
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | pp_hot.c | 2 | ||||
-rw-r--r-- | t/comp/our.t | 19 |
3 files changed, 12 insertions, 11 deletions
@@ -1680,7 +1680,7 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs) int maybe_scalar = 0; /* [perl #17376]: this appears to be premature, and results in code such as - C< my(%x); > executing in list mode rather than void mode */ + C< our(%x); > executing in list mode rather than void mode */ #if 0 if (o->op_flags & OPf_PARENS) list(o); @@ -780,7 +780,7 @@ PP(pp_rv2av) } SP += maxarg; } - else { + else if (GIMME_V == G_SCALAR) { dTARGET; I32 maxarg = AvFILL(av) + 1; SETi(maxarg); diff --git a/t/comp/our.t b/t/comp/our.t index c381c413ff..8029f613c5 100644 --- a/t/comp/our.t +++ b/t/comp/our.t @@ -33,17 +33,18 @@ tie %x, 'TieAll'; {our $x;} is(TieAll->calls, '', 'our $x has no runtime effect'); + {our ($x);} is(TieAll->calls, '', 'our ($x) has no runtime effect'); + {our %x;} is(TieAll->calls, '', 'our %x has no runtime effect'); -{ - local $TODO = 'perl #17376'; - {our (%x);} - is(TieAll->calls, '', 'our (%x) has no runtime effect'); - {our @x;} - is(TieAll->calls, '', 'our @x has no runtime effect'); - {our (@x);} - is(TieAll->calls, '', 'our (@x) has no runtime effect'); -} +{our (%x);} +is(TieAll->calls, '', 'our (%x) has no runtime effect'); + +{our @x;} +is(TieAll->calls, '', 'our @x has no runtime effect'); + +{our (@x);} +is(TieAll->calls, '', 'our (@x) has no runtime effect'); |