I also try to organize my code and docs so I don't lose my freaking mind. So I have other modules like DMS::Setup (aid with installation, check current machine's installation) and maybe DMS::Database, DMS::Configuration... etc
These last modules do not do anything by themselves, they are inherited by the DMS object, sometimes by DMS::User, DMS::Client.
As a design point I'd be sort of suspicious if a DBS::User and a DMS::Client had isa relationships to Configuration and Setup classes - seems odd...
So, since these modules are there for organization's sake, since, they are always used inherited (use base..)- I was considering naming these something like DMS::_Setup, DMS::_Database, so any module names that start with an underscore can be assumed to be inherited.
When I have abstract classes I usually us a suffix of "Base" so I might have MyApp::Page::Base as the abstract class and MyApp::Page::Search as a concrete class that inherits from MyApp::Page::Base.
I want to know if this sounds good. I also would like to know if in your experiences, separating the code up is indeed good, at what line count do you feel good about doing that
Line count isn't really the kind of distinction that I use when deciding to cut up code into modules. Instead break up classes around units of behaviour so we get low coupling and high cohesion in the design.
That's what worries me about having those Setup classes as common classes that everything inherits from. Tweaking Setup seems to affect everything in your code - which is probably a bad thing.
and do you have other ways of dealing with this other then to just put a big warning in the description that says 'dont use me' ?
Personally I don't worry about it. If it's an abstract class I'll document it as one. If it's something private/implementation specific that might change I'll mention that too. If the user uses something that I've told them I might change at a later date that's their problem.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||