diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2002-09-29 22:26:37 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-09-29 22:26:37 +0000 |
commit | de11ba31bba9f0eef0f76239d1d93a010926d6cf (patch) | |
tree | 724cef4d613ee15150c252a4fee3a1d757062516 /op.c | |
parent | b921d661723e8701da56072309db071fd10e051c (diff) | |
download | perl-de11ba31bba9f0eef0f76239d1d93a010926d6cf.tar.gz |
Remove package; (Heh heh.)
p4raw-id: //depot/perl@17942
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -3353,24 +3353,17 @@ Perl_newPVOP(pTHX_ I32 type, I32 flags, char *pv) void Perl_package(pTHX_ OP *o) { - SV *sv; + char *name; + STRLEN len; save_hptr(&PL_curstash); save_item(PL_curstname); - if (o) { - STRLEN len; - char *name; - sv = cSVOPo->op_sv; - name = SvPV(sv, len); - PL_curstash = gv_stashpvn(name,len,TRUE); - sv_setpvn(PL_curstname, name, len); - op_free(o); - } - else { - deprecate("\"package\" with no arguments"); - sv_setpv(PL_curstname,"<none>"); - PL_curstash = Nullhv; - } + + name = SvPV(cSVOPo->op_sv, len); + PL_curstash = gv_stashpvn(name, len, TRUE); + sv_setpvn(PL_curstname, name, len); + op_free(o); + PL_hints |= HINT_BLOCK_SCOPE; PL_copline = NOLINE; PL_expect = XSTATE; |