perl 5.0 alpha 2
[perl.git] / package
1
2 void
3 package(OP *name)
4 { char tmpbuf[256];
5   GV *tmpgv;
6
7   save_hptr(&curstash);
8   save_item(curstname);
9   sv_setpv(curstname,$2);
10   sprintf(tmpbuf,"'_%s",$2);
11   tmpgv = gv_fetchpv(tmpbuf,TRUE);
12   if (!GvHV(tmpgv))
13       GvHV(tmpgv) = newHV(0);
14   curstash = GvHV(tmpgv);
15   if (!curstash->hv_name)
16       curstash->hv_name = savestr($2);
17   curstash->hv_coeffsize = 0;
18   op_free($2);
19   copline = NOLINE;
20   expectterm = 2;
21 }