You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kaare Rasmussen <ka...@kakidata.dk> on 2002/10/28 14:09:15 UTC
Dynamic embperl search path
I'm looking at the description for EMBPERL_OBJECT_ADDPATH. It is very short,
so I don't know if it can do what I want.
The embperl pages of my application is located in /usr/local/freemoney/pages
which is aliased in apache to /fm/. But I want to allow for local
extensions, so some of the pages could be placed under
/usr/local/freemoney/domains/<domain1>/pages. <domain1> will be determined
when the user logs into the system. I don't want to alias all possible
domains in apache.
Can I dynamically add (And remove) unixpaths to and from the search path in
embperl - With EMBPERL_OBJECT_ADDPATH - or otherwise?
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Web: www.suse.dk
2000 Frederiksberg Lørdag 12.00-16.00 Email:kar@kakidata.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Dynamic embperl search path
Posted by Gerald Richter <ri...@ecos.de>.
> I'm looking at the description for EMBPERL_OBJECT_ADDPATH. It is very
short,
> so I don't know if it can do what I want.
>
> The embperl pages of my application is located in
/usr/local/freemoney/pages
> which is aliased in apache to /fm/. But I want to allow for local
> extensions, so some of the pages could be placed under
> /usr/local/freemoney/domains/<domain1>/pages. <domain1> will be determined
> when the user logs into the system. I don't want to alias all possible
> domains in apache.
>
> Can I dynamically add (And remove) unixpaths to and from the search path
in
> embperl - With EMBPERL_OBJECT_ADDPATH - or otherwise?
>
You have access to the current search path of Embperl via
$pathref = $r -> config -> path ;
$r -> config -> path (\@newpath) ;
it returns an array ref to the current path and you can pass it an array ref
to set the new path.
I think this should do what you want
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