perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: use lib in EmbperlObject
Date Fri, 16 Aug 2002 05:25:24 GMT
> >>  Is there any way to put a "use lib" command in a called routine (e.g.
> >>  [- Execute({ isa => 'SiteInit.html' }); -]) and have it impact later
> >>  "use" commands?

use lib is global, because it affects the global @ISA, so it doesn't matter
where you put it, it will affect all use statements that are executed after
the use lib.

>>>Any other suggestions.  I hate having to put it in
> >>  every single file.  (Right up there with [$ var $this $][- $this =
> >>  shift -] at the beginning of each file.

These $this = shift was introduced to be able to support the old thread
model, like Perl 5.005 has it. Since this thread model never had worked
anyway in Perl and now with 5.8.0 we have a new thread model, it should be
possible to make what you call $this a global like %fdat. I will think about
this...

> >
> >Is there a reason you don't just want to load all your 'use lib's up
> >in your startup.pl?
>
> Per-site libraries on a virtual server?  And some of the libraries
> aren't used that often (e.g. the administration section of a web
> site).

use lib is global anyway, so you can put it in the startup.pl. It will not
take up any additional memory, just add a path to @ISA

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message