in reply to Problem with DynaLoader and "use"ing downloaded modules

Many Perl modules require some kind of dynamically-loaded "extras" in addition to the main *.pm files.

These may be C code that's compiled into an .SO (or local equivalent) and loaded by something called DynaLoader, or else they may be little snippets of Perl code that are split off into separate files by tools called AutoSplit and AutoLoader.

Regardless of what kind of "extras" are involved, almost all distributions support a standard series of commands, which will result in all of the necessary bits being set up as they should be.

From a Unix-like shell command prompt, the typical sequence is as follows:

# cd Foo-Bar-1.0/ # perl Makefile.PL # make # make test # make install

If you're retrieving modules from CPAN, you can also use the CPAN shell, which makes this even easier: perl -MCPAN -e 'install Foo::Bar'

Replies are listed 'Best First'.
Re: Re: Problem with DynaLoader and "use"ing downloaded modules
by bnanaboy (Beadle) on Jul 25, 2003 at 19:07 UTC

    Quote:
    Many Perl modules require some kind of dynamically-loaded "extras" in addition to the main *.pm files.

    These may be C code that's compiled into an .SO (or local equivalent) and loaded by something called DynaLoader, or else they may be little snippets of Perl code that are split off into separate files by tools called AutoSplit and AutoLoader.

    So if DynaLoader is where the error is occuring, does that mean @INC needs to include the path to where the shared library files (.so) are located and not just where the Perl .pm files are?

    Update:
    I found the answer to my own question (with some help from bbfu). To help any other newbies who may face the same problem in the future, the needed libraries are included when "make" is run on the package, and don't need to be included in @INC once the module has been successfully installed on the system (see above post for more info on how my problem was solved).