summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-20 16:34:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-20 16:34:33 +0000
commit649da0762311e9a19091946020dc56feadc1378c (patch)
treec2938f1eaaf415ee62d64fd6c89fbf47f5c3af26
parent14dd3ad8c9bf82cf09798a22cc89a9862dfd6d1a (diff)
downloadperl-649da0762311e9a19091946020dc56feadc1378c.tar.gz
glob() takes one or no user arguments and a non-user-visible second
hidden argument, fix its prototype-checking accordingly p4raw-id: //depot/perl@5163
-rw-r--r--op.c3
-rw-r--r--opcode.h2
-rwxr-xr-xopcode.pl2
3 files changed, 4 insertions, 3 deletions
diff --git a/op.c b/op.c
index eb60ec1876..9ba8582152 100644
--- a/op.c
+++ b/op.c
@@ -5504,6 +5504,7 @@ Perl_ck_glob(pTHX_ OP *o)
{
GV *gv;
+ o = ck_fun(o);
if ((o->op_flags & OPf_KIDS) && !cLISTOPo->op_first->op_sibling)
append_elem(OP_GLOB, o, newDEFSVOP());
@@ -5542,7 +5543,7 @@ Perl_ck_glob(pTHX_ OP *o)
gv_IOadd(gv);
append_elem(OP_GLOB, o, newGVOP(OP_GV, 0, gv));
scalarkids(o);
- return ck_fun(o);
+ return o;
}
OP *
diff --git a/opcode.h b/opcode.h
index 9d9cd521f1..51c2d11c0f 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1477,7 +1477,7 @@ EXT U32 PL_opargs[] = {
0x0001368c, /* ref */
0x00122804, /* bless */
0x00001608, /* backtick */
- 0x00132808, /* glob */
+ 0x00012808, /* glob */
0x00001608, /* readline */
0x00001608, /* rcatline */
0x00002204, /* regcmaybe */
diff --git a/opcode.pl b/opcode.pl
index 0dfb9e742d..abf59a4769 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -379,7 +379,7 @@ bless bless ck_fun s@ S S?
backtick quoted execution (``, qx) ck_null t%
# glob defaults its first arg to $_
-glob glob ck_glob t@ S? S?
+glob glob ck_glob t@ S?
readline <HANDLE> ck_null t%
rcatline append I/O operator ck_null t%