summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2002-10-01 02:54:30 -0700
committerhv <hv@crypt.org>2002-10-02 14:15:22 +0000
commitc754c3d7d306f3634bb3500e77dcb37c2c9892e2 (patch)
treeb9522f873e7a752e1def6dbe709b1daf7e1aca2c
parentd1573ac7f3669af3adf9935c83633459afbc51af (diff)
downloadperl-c754c3d7d306f3634bb3500e77dcb37c2c9892e2.tar.gz
Re: [perl #17376] Bug Report - our(%)
Message-ID: <GNdm9gzkgWOS092yn@efn.org> p4raw-id: //depot/perl@17963
-rw-r--r--op.c2
-rw-r--r--pp_hot.c2
-rw-r--r--t/comp/our.t19
3 files changed, 12 insertions, 11 deletions
diff --git a/op.c b/op.c
index 4804bf11c3..c7d085c9f9 100644
--- a/op.c
+++ b/op.c
@@ -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);
diff --git a/pp_hot.c b/pp_hot.c
index cc301baebf..8d56ada1b0 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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');