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.


In reply to autoloading with use lib by thpfft

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.