G'day mldvx4,

[In the following, to avoid wrapping, I replaced /home/ken/perl5/perlbrew/perls/perl-5.36.0 with just /PB.]

All of my modules are in one of these directories:

$ perl -E 'say for @INC' /PB/lib/site_perl/5.36.0/cygwin-thread-multi /PB/lib/site_perl/5.36.0 /PB/lib/5.36.0/cygwin-thread-multi /PB/lib/5.36.0

If you run that command, you should get a similar list. Unless you're running Cygwin, you won't have "cygwin-thread-multi". You may additionally have paths with "vendor". The point being that I have all of my modules in @INC directories; not doing this means repeatedly having to add use lib ... statements to many scripts.

To achieve this, I just run the standard incantation:

perl Makefile.PL make make test make install

I let Perl add the module code in appropriate places and don't have to think about it any further.

There are a variety of other ways to do this. These seem to be popular, although I don't use them: Module::Build and local::lib.

So, my recommendation would be to pick a method for installing your modules and use it consistently. Let Perl do most of the work for you. :-)

I've no idea how you develop your modules. If you're doing all the work manually, you may want to look at automating some of it (again, letting Perl work for you). You might want to ask about that separately.

— Ken


In reply to Re: Placement of custom modules outside of home directory? by kcott
in thread Placement of custom modules outside of home directory? by mldvx4

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.