Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by lemming (Priest)
on Jun 25, 2001 at 05:20 UTC ( #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
    Node Status?
    node history
    Node Type: note [id://91162]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (12)
    As of 2014-08-22 15:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (159 votes), past polls