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

Hello All,

this may be silly, but here's my issue:
I need the module 'GDBM_File' for a script somebody wrote. Hwever, the script doews not find the module. This module is supposed come with Perl-5-8-6 (I have that installed). Any attempt to get said module results in attempting to download perl all over again.

I wonder if there is a way to use the source posted in CPAN?? I can't seem to find any docs on how to install the module from source.

Follow the on screen instructions for configuration. Choose a mirror close to you.

When setup is completed, type the command (at the "cpan>" prompt):
inst GDBM_File
It should install the module in some appropriate place.

For ActiveState Perl, use the "ppm" command instead of "cpan". Proceed to step 4.

If you'd rather use a downloaded file and configure everything by hand:

download the package from CPAN (should be a tar.gz file)

unpack it (tar xzf module.tar.gz)

enter the module directory created and follow the instructions from the INSTALL file.

should be something such as perl Makefile.PL ; make ; make test ; make install

When done, get sure the installed module is in the search path for perl ( @INC variable). For instance you currently have your GDBM_File.pm in /usr/src/contrib/perl5/ext/GDBM_File/ folder, which is NOT in the @INC :

If for some reason you'd like to keep the module in some unusual place (for instance because you modified it), then you should add the directory where your module is to the @INC in each script using it. Add this at the beginning of your script (before the "use somemodule" statement):

Update: Apparently you're running FreeBSD, don't you? For some reason the module appears under /usr/src, maybe that means it still need to be compiled before use. Go the the directory, see if there's a "Makefile.PL" file lying there. If it's there, you'll probably need to compile/install the module before use (see above). If there isn't any Makefile, then the module is probably usable "as is", just add the directory to @INC in your script.