Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: package NAME; Message-ID: <1991Jun20.025018.21725@jpl-devvax.jpl.nasa.gov> Date: 20 Jun 91 02:50:18 GMT References: <7329@vela.acs.oakland.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 19 In article <7329@vela.acs.oakland.edu> schemers@vela.acs.oakland.edu (Roland Schemers III) writes: : Just wondering why you have to have a static name for a package instead : of having it be an expression. ie: : : package foo; : : instead of : : $bar="foo"; : package $bar; Because variable names are looked up in the symbol table at compile time, not at run time. Having a parameterized package name implies a parameterized symbol table, and I don't want to think about what it would take to make that work. It would make it easier to write generic packages, but you'd take a run-time hit. For now, it's best to use other means of parameterization, such as *foo and eval. Larry