summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorAbhijit Menon-Sen <ams@wiw.org>2002-09-29 22:26:37 +0000
committerAbhijit Menon-Sen <ams@wiw.org>2002-09-29 22:26:37 +0000
commitde11ba31bba9f0eef0f76239d1d93a010926d6cf (patch)
tree724cef4d613ee15150c252a4fee3a1d757062516 /op.c
parentb921d661723e8701da56072309db071fd10e051c (diff)
downloadperl-de11ba31bba9f0eef0f76239d1d93a010926d6cf.tar.gz
Remove package; (Heh heh.)
p4raw-id: //depot/perl@17942
Diffstat (limited to 'op.c')
-rw-r--r--op.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/op.c b/op.c
index 362dd00dad..89e124671e 100644
--- a/op.c
+++ b/op.c
@@ -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;