Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: To sub or not to sub, that is the question?

by lemming (Priest)
on Jun 25, 2001 at 05:20 UTC ( [id://91162]=note: print w/replies, xml ) Need Help??


in reply to To sub or not to sub, that is the question?

I've always liked the "If it's a routine that takes up more than a page, break it into subroutines"

Though I really follow

  • Redundent areas get put into subroutines
  • Use descriptive names for your subroutines so that it should be intuitive what they are doing. Comments can help as well
  • Update: Coding style links, not just sub issues:

  • Regarding style
  • Suggestions for working with poor code
  • Silly code reviews and shift
  • A few style suggestions The thread's good, but I like tilly's points
  • is this correct? Some subroutine pitfalls illustrated
  • Call Subroutines by Approximate Name No help, but amusing
  • Monk ethics: Beauty vs. Power
  • A question of style
  • Another commenting question, More on commenting
  • p.s. Nothing like archaeological digs through the monastery. Tends to be a good learning experience.

    • Comment on Re: To sub or not to sub, that is the question?

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://91162]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others contemplating the Monastery: (3)
    As of 2024-04-19 20:11 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found