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

Re^2: Can I please have *simple* modules?

by Aristotle (Chancellor)
on Nov 24, 2005 at 14:55 UTC ( #511445=note: print w/ replies, xml ) Need Help??

in reply to Re: Can I please have *simple* modules?
in thread Can I please have *simple* modules?

#11911 You wrote the same thing twice here. The cardinal rule of programming is that you never ever write the same thing twice.

Makeshifts last the longest.

Comment on Re^2: Can I please have *simple* modules?
Re^3: Can I please have *simple* modules?
by Perl Mouse (Chaplain) on Nov 24, 2005 at 15:26 UTC
    What? You only have at most one for() statement, or one while (<$handle>) statement per program? Or do you factor that out as well?

    Never writing the same thing twice doesn't work on a low level. Accessors are low level.

    Perl --((8:>*
      Damn, you tell me that after I spent hours trying to figure out how to avoid writing and rewriting #!/usr/bin/perl in all my programs! ;-)

      (Well, actually I tend to use editor templates for that...)

      They follow a repetitive pattern. So you write a closure that encapsulates this pattern and assign instances of it to globs in your symbol table. This is Perl, not C. Copypasting is stupid busywork.

      Makeshifts last the longest.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-04-01 14:42 GMT
Find Nodes?
    Voting Booth?

    Who makes your decisions?

    Results (23 votes), past polls