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

Just a quick question. I'm installing a system that uses a mixture of modules, some mine and some cpan, on a virtual server without sufficient access to install the modules properly. So I'm pulling them in with use lib, from a directory just outside the web root, which i'll call 'soup'.

In most cases that's fine, but not all: the very useful Image::Size (many thanks to merlyn for the column) uses autoloader and gets upset.

I seem to have the answer: Build the module as usual, skip the install step, copy the contents of ./blib/lib to the the soup directory. That leaves me with soup/Image and soup/auto, and it makes the syntax errors go away.

The docs for autoloader suggest that this is fine: as long as the .al files are stored in the correct location with respect to the module that refers to them, all is well. The problem is that i only understood about .03% of the docs for autoloader, so i have no way of knowing if this is going to come back and bite me or not.

Is it going to work? Am I up the wrong tree?

thanks from will

ps. I also managed to make the error messages go away by commenting out the autoloader line and the __END__, but that was altogether too close to turning up the radio, and anyway i'd like that reduced overhead if i can get it.

Replies are listed 'Best First'.
(tye)Re: autoloading with use lib
by tye (Sage) on Jun 04, 2001 at 19:11 UTC

    You also need to copy blib/arch to the same directory. Once you do that, things should be fine as long as you built the module on a very similar machine with the same version of Perl.

            - tye (but my friends call me "Tye")