Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-08-23 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls