Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I suppose your underscore idea would be fairly clear, given its similarity to the existing convention for indicating "private" methods/properties, but appending "::Abstract" to the class name seems to be the more common way of handling it.

As far as your side questions, yes, separating the code up is good, provided you don't have to couple the modules too tightly. I break things up based on conceptual integrity rather than line count - if the Employee class needs 10,000 lines to implement, then it gets a 10,000 line file. But that's extremely rare. Looking over my current project, all of the modules but one are under 300 lines. (The exception is about 600, mostly because it has a lot of calculations in it.)

Aside from a comment at the top of my abstract class modules, I also emit warnings if the any methods are called on it that don't make sense, which also helps in catching calls that should be overridden, but weren't.


In reply to Re: Naming of modules that are mean to be inherited only? by dsheroh
in thread Naming of modules that are mean to be inherited only? by leocharre

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 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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found