I'm in agreement with other Monks here... put each one into its own module file. Do not put all of this within a single module/library.

That said, if there are benefits to separating them out into separate distributions, such as does the one someone wants (PS2png for example) install significantly faster than installing the bundle, is there one out of the many that cause difficulty during install where the others don't, or will the parent ever become extensible where you will add more later?

In those cases (and I've only named three), I'd break it up; each one a separate distribution, then possibly create a top-level distribution that when installed, will bring in all of them together:

Postscript::Objectives; - Postscript::PSjoin - Postscript::PS2png - Postscript::PStopdf

...for example. That way, your users will be able to install each one individually, or all of them as the top-level bundle distribution.

Drawback to this approach is that there's usually more documentation that has to be created and kept up-to-date, but that's not usually too much of a problem, as you're writing POD for each module anyhow.

Also, typically, that'd mean that you've got several locations for each part of source code (repositories, as it were), so there's a bit more effort on the back-end software management front there. That said, testing can still be all performed for everything in the parent library for all sub-distributions, because it brings in all of them anyhow. This is exactly how I maintain RPi::WiringPi

Update: Forgot to add about one of the benefits of separate distributions... if you ever add a new module to the collective, you need only slight changes to the top-level parent one. Likewise, if they are all separate, fixing a bug in a sub-distribution does not at all affect the efficacy of the top-level one; ie., there's no chance that if you break a sub-dist via an update of any sort, it'll only affect that distribution only; it won't cause a collapse of the whole shebang, even if by mistake and it gets past all of your best efforts of ensuring things don't cascade into a nightmare.


In reply to Re: Building Good Modules by stevieb
in thread Building Good Modules by John N8UR

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.