Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: How to properly use modules?

by Happy-the-monk (Abbot)
on Apr 21, 2012 at 06:12 UTC ( #966311=note: print w/ replies, xml ) Need Help??

in reply to How to properly use modules?

Isn't it a good thing to have all the code in one place

Yes, it actually is a programmer's motto: "don't repeat yourself".

Cheers, Sören

Comment on Re: How to properly use modules?
Replies are listed 'Best First'.
Re^2: How to properly use modules?
by Anonymous Monk on Apr 21, 2012 at 06:53 UTC

    Actually no :) DRY says make subroutines/modules, not put it all in one file

    Sure, you could turn four scripts into one module, or you could turn them into four modules, it all depends on how much they share

Re^2: How to properly use modules?
by tercoz (Acolyte) on Apr 21, 2012 at 09:59 UTC
    Yes repeating is not good, indeed. I just wanted to do some tests with Test::More module and got into a problem, my module is too small and do not cover everything I'd like to test, because most of important subroutines are in the .pl files, how to write tests for those - dunno...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-31 10:38 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (276 votes), past polls