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

Re: When is a module too minimal?

by philcrow (Priest)
on Jul 19, 2006 at 12:42 UTC ( #562271=note: print w/replies, xml ) Need Help??


in reply to When is a module too minimal?

I don't just think it's OK to have a trivial driver, I think it is the goal. See for example pod2html. The one installed with my Perl is 144 lines. Of those, 137 are POD and 2 others are blank.

By carefully factoring code out of the script into modules, you allow other script and module authors to leverage your code. If you leave everything (or anything) in the script reuse becomes harder, especially if you don't use many subs.

I think of a the ideal script as a mapper between command line arguments and one or more modules (not that I always achieve the ideal).

Phil

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-06-13 17:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (57 votes). Check out past polls.

    Notices?