Yes, I really ought to set a PERL5LIB Environment Variable, but that is a messy option since every user using my script would have to set PERL5LIB. Well there aren't many users on my machine, but since these scripts are run as cron jobs, root would have to have PERL5LIB set too.

The REAL problem is that @INC is hard-coded into the Perl binary, and Ubuntu/Debian have decided to set it to

/etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .

So clearly they expect you to use /usr/local/lib/perl/5.18.2 or /usr/local/share/perl/5.18.2 for your personal libraries, but if your private library includes any C-coded stuff it does not work. Seems like a Ubuntu/Debian Bug to me, and I am minded to report it as such.


In reply to Re^2: A Confession by clerew
in thread A Confession by clerew

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.