[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Perl and lib-files
- Subject: Re: [cobalt-users] Perl and lib-files
- From: "Jelmer Jellema" <cobalt@xxxxxxxxxxxxxxx>
- Date: Thu Apr 11 00:15:08 2002
- Organization: Spin in het Web (www.spininhetweb.nl)
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi Mikael,
Yes, no problem. these are modulair files consisting of perl functions and
the like. One can include those using the "use" or "require" keywords.
Your client could create a perl directory in the sites dir, like
/home/sites/siteX/perl
to add this directory to the module include path in perl, (s)he should put
something like:
-------------------------
BEGIN
{
#set HOME environment var
$ENV{HOME} = (getpwuid($>))[7];
#same for SITE
$ENV{SITE} = "$ENV{HOME}/../.."; #cobalt: user dir is 2 levels under
site dir
#add module dir to inc-list:
unshift(@INC, "$ENV{SITE}/perl");
}
--------------------------
to the start of all scripts (or use the #/usr/bin/perl -I syntax).
Jelmer
----- Original Message -----
From: "Mikael Siirilä"
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Thursday, April 11, 2002 2:21 PM
Subject: [cobalt-users] Perl and lib-files
>
> On Raq4: Can Perl scripts use lib-files that are located in the virtual
site
> directories? What are these files that a user is asking about?
>
> Thanks.
>
> --
> Mikael
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>