Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Practice differs in this area, but I would suggest the following guidelines:
  • If you use it all over the place, it should probably be in a package or some other shared place so if you enchance or bugfix it one place, you don't need to hunt down all other copies
  • If you want to share it, it's easier for people to take your code as a package/module than to cut'n'paste it, and it makes version tracking easier
  • Of course, if you're doing objects, it's best to put them into packages :)
In short, packages/modules are usually a good thing, provided the borders between them are sensible, and provided you have time to structure your code that way. It doesn't hurt if you start new coding projects programming entirely in that fashion. That way, you'll develop nice templates and tools to help you, and once you get used to it, any moderately big application (or set of small ones) will be just as quick to implement that way as the flat way.

In reply to Re: Perl Module Useage by Improv
in thread Perl Module Useage by gawatkins

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 cooling their heels in the Monastery: (5)
As of 2024-04-25 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found