summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package21
1 files changed, 21 insertions, 0 deletions
diff --git a/package b/package
new file mode 100644
index 0000000000..6c2785d2ba
--- /dev/null
+++ b/package
@@ -0,0 +1,21 @@
+
+void
+package(OP *name)
+{ char tmpbuf[256];
+ GV *tmpgv;
+
+ save_hptr(&curstash);
+ save_item(curstname);
+ sv_setpv(curstname,$2);
+ sprintf(tmpbuf,"'_%s",$2);
+ tmpgv = gv_fetchpv(tmpbuf,TRUE);
+ if (!GvHV(tmpgv))
+ GvHV(tmpgv) = newHV(0);
+ curstash = GvHV(tmpgv);
+ if (!curstash->hv_name)
+ curstash->hv_name = savestr($2);
+ curstash->hv_coeffsize = 0;
+ op_free($2);
+ copline = NOLINE;
+ expectterm = 2;
+}