I'm starting to recompartmentalize code that is in 250+ library files (*.pm) into module distributions. The main motivation for doing this is to be able to integrate in unit tests so that modules can be tested standalone before installation.

(Is this a bad approach? Would it be better to just keep using the source module files (*.pm) directly without modulizing them, and just come up with some way to handle unit tests, rather than use the h2xs-generated framework?)

These module distributions use the same structure as CPAN modules (start with h2xs), but for the most part, they won't become CPAN modules because they are not general purpose. Previously, the mod_perl-driven website that used these modules used "use lib ..." to access the source for the libraries directly so there was no module build process, but in converting them to module distributions, they will each require building with:

perl Makefile.PL make make test make install

The modules will need to be installed on multiple servers. Their source code will undergo frequent modifications, so the modules will frequently need to be upgraded (re-installed) on multiple servers. The module sources will be kept in CVS.

With these not being CPAN modules, what is a good way to determine which version of each module is currently installed on a system? Also, what is a good way to handle the build process so that only those modules that have been modified are rebuilt? I can do a CVS update of the module sources on each system, but I need some way to determine which modules need to be re-built and re-installed. I have thought of making a global Makefile (or perl script that does basically the same thing a Makefile would do) to handle this, but am not sure if that's the best approach.

For CPAN modules, I can get pretty much what I need with Bundle files and the "autobundle" command in CPAN.pm, but I'm just not sure what is the best (and that requires the least amount of additional work) way to achieve similar capablity for non-CPAN modules. Is there some (relatively easy) way I can leverage off existing CPAN.pm functionality to treat these non-CPAN modules as though they were on CPAN?


In reply to non-CPAN module distributions by mp

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.