SPUG: Installing Crypt, not su
tuck at whistlingfish.net
Fri Dec 29 03:52:00 CST 2000
-- Joe Devlin <jdevlin at stadiumdistrict.com> spake thusly:
> The use DES; is still failing, while MD5 and CBC use statements seem
> to succeed.
> I re-installed DES from a clean tar file.
> There are several DES modules floating around after the installation,
> I'm not sure which one is supposed to be referenced in @INC.
> I confirmed directory structure as you suggested
> [myAccount at seker DES]$ pwd
> _perl/5.6.0/ i386-inux/auto/Crypt/DES
> [myAccount at seker DES]$ ls
> DES.bs DES.so
> [myAccount at seker Crypt]$ pwd
> _perl/5.6.0/i3 86-linux/Crypt
> [myAccount at seker Crypt]$ ls
> use lib qw(
> use Common; #standard project stuff
> use DBI; #datbase interface
> use CGI qw(:all); #creating web pages
> use CGI param;
> use English;
> use diagnostics; #verbose failure codes
> use MD5;
> use CBC; #to encrypt registration info
> use DES;
Wow. That's certainly more complicated than I'd bother with; I would just install everything in '/home/a/myAccount/lib' and do one 'use lib', but that's all you, I suppose.
As I said last time, I've noticed people doing things like:
use lib qw(/home/tuck/lib/Crypt);
Which works, but is not appropiate. The proper thing to do is:
use lib qw(/home/tuck/lib);
This allows perl to find the proper auto hierarchies as well, and makes
your code more consistent in that you do 'use Crypt::DES' and reference
the module later as 'Crypt::DES', rather than doing 'use DES' and then later calling it 'Crypt::DES'.
To sum up, you should probably do the following:
# Note the removal of '/Crypt' from the end of the first one
use lib qw(
use Crypt::DES; # <-- note the full name on these two
use Digest::MD5; # <-- note the use of Digest::MD5 instead
# of plain old MD5, which is deprecated
By the way, you probably shouldn't install things under directories like 'site_perl/5.6.0' unless you actually HAVE perl 5.6.0. If you do, then that's fine, otherwise you're better off matching your actual version or just not bothering with all that extra path stuff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20001229/57fa8e3e/attachment.bin
More information about the spug-list