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

Jerry Krinock jerry at ieee.org
Mon Jul 10 11:45:08 PDT 2006


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:

Can't locate SSLicensing/Generator.pm in @INC (@INC contains: /sw/lib/perl5
/sw/lib/perl5 /System/Library/Perl/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level
/Library/Perl/5.8.6 /Library/Perl
/Network/Library/Perl/5.8.6/darwin-thread-multi-2level
/Network/Library/Perl/5.8.6 /Network/Library/Perl
/System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at
/Users/jk/bin/generateSN.pl line 2.
BEGIN failed--compilation aborted at /Users/jk/bin/generateSN.pl line 2.

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

Jerry




More information about the X-Unix mailing list