diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-22 09:48:02 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-22 09:48:02 +0000 |
commit | 0da4822f11e97ce202166899552c06d720eb835a (patch) | |
tree | 2a629ad4539739bcf6e0d9a49d8f52cbcc3a3196 /op.c | |
parent | a80f87c48e630b044cd5371d547b0f38e4476ec0 (diff) | |
download | perl-0da4822f11e97ce202166899552c06d720eb835a.tar.gz |
- shift() inside BEGIN|END|INIT now shifts @ARGV instead of @_
- added a test for the above
- fixed up perly.c.diff and vms/perl_c.vms for above and added the
ansification hunks
p4raw-id: //depot/win32/perl@277
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3438,9 +3438,9 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block) CV *cv; HV *hv; - sv_setpvf(sv, "%_:%ld-%ld", - GvSV(curcop->cop_filegv), - (long)subline, (long)curcop->cop_line); + sv_setpvf(sv, "%_:%ld-%ld", GvSV(curcop->cop_filegv), + (long)(subline < 0 ? -subline : subline), + (long)curcop->cop_line); gv_efullname3(tmpstr, gv, Nullch); hv_store(GvHV(DBsub), SvPVX(tmpstr), SvCUR(tmpstr), sv, 0); if (!db_postponed) { @@ -4412,7 +4412,7 @@ ck_shift(OP *o) op_free(o); #ifdef USE_THREADS - if (subline) { + if (subline > 0) { argop = newOP(OP_PADAV, OPf_REF); argop->op_targ = 0; /* curpad[0] is @_ */ } @@ -4423,7 +4423,7 @@ ck_shift(OP *o) } #else argop = newUNOP(OP_RV2AV, 0, - scalar(newGVOP(OP_GV, 0, subline ? + scalar(newGVOP(OP_GV, 0, subline > 0 ? defgv : gv_fetchpv("ARGV", TRUE, SVt_PVAV)))); #endif /* USE_THREADS */ return newUNOP(type, 0, scalar(argop)); |