[ic] How to use perl with out root access...

Boyd Lynn Gerber interchange-users@interchange.redhat.com
Thu Oct 25 20:43:01 2001


I hope this can help someone else.

You can use this below as you want.

Thanks again for all the help.



To begin the perl modules on the site were to old and I needed newer
version.  To start I created a local .cpan directory.  To do this you
create a local .cpan.   But you need to be able to make and install perl.
To do this I created a perl-local or cpan-local file and created a
directory local with a bin, lib, share, info, and man.  You have to have
the basic three bin, lib, and man.

-----------------------------Cut Here perl-local---------------------
PREFIX=/home/user_directory/local \
INSTALLPRIVLIB=/home/user_directory/local/lib/perl5 \
INSTALLSCRIPT=/home/user_directory/local/bin \
INSTALLSITELIB=/home/user_directory/local/lib/perl5/site_perl \
INSTALLBIN=/home/user_directory/local/bin \
INSTALLMAN1DIR=/home/user_directory/local/lib/perl5/man \
INSTALLMAN3DIR=/home/user_directory/local/lib/perl5/man/man3
-----------------------------Cut Here--------------------------------

What I did was use this as my perl make command.

perl Makefile.PL `cat ~/perl-local`

The key is you have to have write access to the directory where you have
your files.

This now allows you to make and install the perl files.  But you still
have to deal with the system perl files.  Perl 5 has an enviroment
variable to solve this.

I add this to my .profile.  I use the korn shell.

PERL5LIB=/home/user_directory/local/lib/perl5:/home/user_diretory/local/lib/perl5/site_perl:
export PERL5LIB

Now I could run perl with the correct modules.

The next problem was getting apache to be able to run the correct perl
files.

So I had these two lines added to the vhost.conf file.

Set Env PERL5LIB /home/boyd/local/lib/perl5:/home/boyd/local/lib/perl5/site_perl:
PassEnv PERL5LIB

You may need a PATH or LD_LIBRARY_PATH that you can do the same way.

Now to get perl to run I had to add these two things.

from
#!/usr/bin/perl -wT to
use lib '.';                    # for suid installations

#!/usr/bin/perl -wT -I/home/user_directory/local/lib/perl5
use lib '.';                    # for suid installations
use lib '/home/user_directory/local/lib/perl5/site_perl';


At this point everything was working.  I hope this helps some one else.

Good Luck,

--
Boyd Gerber <gerberb@zenez.com>
ZENEZ	3748 Valley Forge Road, Magna Utah  84044
Office 801-250-0795 FAX 801-250-7975