Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-05-29 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?