the easiest way to tell if you have a module installed is 

$ perl -MModule::Name

if you have the module perl will load it and wait (ctrl-d to exit), and if
you don't it will choke.

requires in eval { } 's is good for code that will be distributed and needs
to do different things based on what's available, but for just testing it's
huge overkill.

darren

Dave Reinhardt ([EMAIL PROTECTED]) wrote:
> perl -V got me the following, BUT how do I tell if Perl modules: Digest::MD5, 
>Crypt::DES, Crypt::CBC
> are installed?
> 
> # perl -V
> Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
>   Platform:
>     osname=freebsd, osvers=3.0-19980804-snap, archname=i386-freebsd
>     uname='freebsd 192.168.173.90 3.0-19980804-snap freebsd 3.0-19980804-snap #13: 
>thu oct 1 21:06:05 edt 1998 admin@:usrsrcsyscompilepowerbsd i386 '
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O', gccversion=2.7.2.1
>     cppflags='-I/usr/local/include'
>     ccflags ='-I/usr/local/include'
>     stdchar='char', d_stdstdio=undef, usevfork=true
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>     alignbytes=4, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='ld', ldflags =' -L/usr/local/lib'
>     libpth=/usr/lib/aout /usr/local/lib /usr/lib
>     libs=-lm -lc -lcrypt
>     libc=/usr/lib/aout/libc.so.3.1, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>     cccdlflags='-DPIC -fpic', lddlflags='-Bshareable -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl): 
>   Built under freebsd
>   Compiled at Oct  8 1998 12:38:21
>   @INC:
>     /usr/local/lib/perl5/5.00502/i386-freebsd
>     /usr/local/lib/perl5/5.00502
>     /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>     /usr/local/lib/perl5/site_perl/5.005
>     .

-- 
Wise people think all they say; fools say all they think.

Reply via email to