[X-Unix] Where to put my personal Perl Modules?

Eric F Crist ecrist at secure-computing.net
Mon Jul 10 14:22:49 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jul 10, 2006, at 1:45 PM, Jerry Krinock wrote:

> I have written several perl scripts that I keep in ~/bin.  Also, ~/ 
> bin is in
> my bash PATH, so I can access them from any current directory.
>
> But today I wrote a perl Module and added it as a subfolder to ~/ 
> bin.  If I
> cd to ~/bin and run a perl script which "uses" the Module from  
> there, it
> works fine.  But if I'm somewhere else and type the command,  
> relying on my
> bash PATH to find it, the perl compiler cannot find my module.   
> It's looking
> in all these system paths:
>
[snip]

> I hate installing things outside my home folder.  Is there a robust,
> non-kludgey solution to this?


Try defining the entire path to the module you're trying to use.   
Simply make reference to $HOME/bin/ as a relative path, even set it  
as some sort of variable if you'd prefer, so that your script can  
correctly find the module you need.

- -----
Eric F Crist
Secure Computing Networks
http://www.secure-computing.net



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEARECAAYFAkSyxSoACgkQUVeKtG0kPmphjQCgl+DarzLD3C0WAUcq91WdDWgN
9T0An2DTk8r8hmoxprp0msBEGbI+X0tz
=RNRN
-----END PGP SIGNATURE-----


More information about the X-Unix mailing list