Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

this time I need really your help.I'm not total newbie to perl, but I would not call me an expert.
I'm new on my actual workplace and want to install my favorite non-standard Perl-modules.

But the problem is the following:

When I install a module it is put in /usr/local/.. directory,
but I would prefer an installation to /usr/freeware/.. because of some intern network specs

My @INC:

/usr/freeware/lib/perl5/5.6.1/irix-n32
/usr/freeware/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/irix-n32
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
/usr/freeware/lib/perl5/sgi_perl/5.6.1/irix-n32
/usr/freeware/lib/perl5/sgi_perl/5.6.1
/usr/freeware/lib/perl5/sgi_perl

I already tried to for perl (/usr/freeware/bin/perl) using PREFIX when doing perl Makefile.PL
but the module was installed in the /usr/local/lib/perl5/ .. dir.
I know that the default include path is built into the Perl executable when Perl is compiled.
But I block on the fact that I do not know where I can specify or force the installation to /usr/freeware dirs?

Thanks a lot in advance for your help,

Lulu

  • Comment on Installing a non-standard module to the right place

Replies are listed 'Best First'.
Re: Installing a non-standard module to the right place
by TStanley (Canon) on Mar 21, 2003 at 20:58 UTC
    Since it looks like your are using a *nix type system, you can set the PERL5LIB variable within your .profile to the directory that you want to install modules in


    Update: Plus, you follow the suggestion that vek mentions and you should be all set.

    TStanley
    --------
    It is God's job to forgive Osama Bin Laden. It is our job to arrange the meeting -- General Norman Schwartzkopf
Re: Installing a non-standard module to the right place
by vek (Prior) on Mar 21, 2003 at 21:58 UTC
    Lulu - You can specify which directory you want your modules installed like this:
    perl Makefile.PL PREFIX=/path-to/your-dir LIB=/path-to/your-dir
    -- vek --
      Since you're on a *nix system, you can also bypass another installation by doing the following:

      cd /path/to/perl/modules for i in `ls -1` do ln -s `pwd`/$i /path/you/want/sym-link/created/$i done
      This will create sym-links for all the files in the module directory (or whever you want them created)
      that you originally wanted them made.

      The only reason I do the 'ln -s' route is because you then don't have to recompile/delete/etc.