I am putting this app together, an online document access management system. I want to be able to install it on diff machines, I want to release parts of it and eventually the whole thing on CPAN. It's a big project, and the code is getting bigger. My running script is very small, it just calls some functions from included modules, like &get_tainted_data, &check_tainted_data, &get_session_data, &print_html_header .. etc etc.

subs that deal with simply html stuff are in a module like Html.pm, stuff that deals with file info, file actions, etc is in Files.pm, stuff that deals with sessioning is in Session.pm etc etc..
All this has really helped me move along, isolate development bugs, etc

I want to conform to the community's standards- Just what should a perl module do? As it stands my modules pretty much depend on each other- so... am i being retarded or bad manared separating my code into modules this way? should I only sepparate code into modules if they can be used alone ? Am I worrying too much about this, should I just go apesh&t and make any modules I want and .. even.. pl files and the old function files.. what were they, pf or something.. ?

I've read some texts on modules. there's a lot of talk about syntax, structure, scope, etc .. but where can i find some.. about.. ethics? and making it more useful to other people?

update: I have simplified my question: If I have cake.pm and dog.pm, and neither does anything useful without the other.. should they not be dogcake.pm instead ?


In reply to how far should i split my code into modules by leocharre

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.